+ include apt::params
+ include apt::update
+
+ $sources_list_d = $apt::params::sources_list_d
+
+ if ! $release {
+ fail('lsbdistcodename fact not available: release parameter required')
+ }
+
+ if $::operatingsystem != 'Ubuntu' {
+ fail("apt::ppa is currently supported on Ubuntu only.")
+ }
+
+ $filename_without_slashes = regsubst($name, '/', '-', 'G')
+ $filename_without_dots = regsubst($filename_without_slashes, '\.', '_', 'G')
+ $filename_without_ppa = regsubst($filename_without_dots, '^ppa:', '', 'G')
+ $sources_list_d_filename = "${filename_without_ppa}-${release}.list"
+
+ if $ensure == 'present' {
+ $package = $::lsbdistrelease ? {
+ /^[1-9]\..*|1[01]\..*|12.04$/ => 'python-software-properties',
+ default => 'software-properties-common',
+ }