X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=manifests%2Fppa.pp;h=2a5b4a868de955037e5e42c1c842e1fffa387662;hb=refs%2Fheads%2Fpdksync_%28MAINT%29_Pin_puppetlabs-puppet_agent;hp=e3c53e8e6d6f5226962da2507e4ce41dc97e0ff3;hpb=dad7d73906dfd1ac3950da511d435f63dd7778f3;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/ppa.pp b/manifests/ppa.pp index e3c53e8..2a5b4a8 100644 --- a/manifests/ppa.pp +++ b/manifests/ppa.pp @@ -40,7 +40,7 @@ define apt::ppa ( } # Validate the resource name - if $name !~ /^ppa:([a-zA-Z0-9\-_]+)\/([a-zA-z0-9\-_]+)$/ { + if $name !~ /^ppa:([a-zA-Z0-9\-_.]+)\/([a-zA-z0-9\-_\.]+)$/ { fail("Invalid PPA name: ${name}") } @@ -67,8 +67,9 @@ define apt::ppa ( $trusted_gpg_d_filename = "${dash_filename_no_specialchars}.gpg" } - # This is the location of our main exec script - $script_path = "/opt/puppetlabs/puppet/cache/add-apt-repository-${dash_filename_no_specialchars}-${release}.sh" + # This is the location of our main exec script. + $cache_path = $facts['puppet_vardir'] + $script_path = "${cache_path}/add-apt-repository-${dash_filename_no_specialchars}-${release}.sh" if $ensure == 'present' { if $package_manage { @@ -110,8 +111,11 @@ define apt::ppa ( logoutput => 'on_failure', notify => Class['apt::update'], require => $_require, + before => File["${apt::sources_list_d}/${sources_list_d_filename}"], } } + + file { "${apt::sources_list_d}/${sources_list_d_filename}": } } else { tidy { "remove-apt-repository-script-${name}":