diff --git a/manifests/ppa.pp b/manifests/ppa.pp index 9c277e9bd4..678ca6ab80 100644 --- a/manifests/ppa.pp +++ b/manifests/ppa.pp @@ -5,14 +5,19 @@ ) { require apt + $ppa = regsubst($name, '^(ppa:)(.*)$', '\2') + $ppa_apt_name = regsubst($ppa, '/', '-', 'G') + $ppa_list_file = "${ppa_apt_name}-${::lsbdistcodename}.list" + exec { "apt-update-${name}": - command => "/usr/bin/aptitude update", + command => '/usr/bin/aptitude update', refreshonly => true, } exec { "add-apt-repository-${name}": command => "/usr/bin/add-apt-repository ${name}", - notify => Exec["apt-update-${name}"], + creates => "/etc/apt/sources.list.d/${ppa_list_file}", + notify => Exec["apt-update-${name}"]; } }