X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Fppa.pp;h=d6b49007608c2f6811d3d4d812b017a200727173;hb=bf92497e62ca6ec11588832a0842ccae974f5adc;hp=cf98fdd5e1a153da357f58afb7888399ea113814;hpb=8f5cb7341ae362442dfd8e06129d39583f588bf0;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/ppa.pp b/manifests/ppa.pp index cf98fdd..d6b4900 100644 --- a/manifests/ppa.pp +++ b/manifests/ppa.pp @@ -2,23 +2,22 @@ define apt::ppa( $ensure = 'present', $options = $::apt::ppa_options, - $release = $::apt::params::xfacts['lsbdistcodename'], + $release = $::apt::xfacts['lsbdistcodename'], $package_name = $::apt::ppa_package, $package_manage = false, ) { - include 'apt::params' - unless $release { fail('lsbdistcodename fact not available: release parameter required') } - if $::apt::params::xfacts['lsbdistid'] == 'Debian' { + if $::apt::xfacts['lsbdistid'] == 'Debian' { fail('apt::ppa is not currently supported on Debian.') } $filename_without_slashes = regsubst($name, '/', '-', 'G') $filename_without_dots = regsubst($filename_without_slashes, '\.', '_', 'G') - $filename_without_ppa = regsubst($filename_without_dots, '^ppa:', '', 'G') + $filename_without_pluses = regsubst($filename_without_dots, '\+', '_', 'G') + $filename_without_ppa = regsubst($filename_without_pluses, '^ppa:', '', 'G') $sources_list_d_filename = "${filename_without_ppa}-${release}.list" if $ensure == 'present' { @@ -47,7 +46,7 @@ define apt::ppa( unless => "/usr/bin/test -s ${::apt::sources_list_d}/${sources_list_d_filename}", user => 'root', logoutput => 'on_failure', - notify => Exec['apt_update'], + notify => Class['apt::update'], require => $_require, } @@ -59,7 +58,7 @@ define apt::ppa( else { file { "${::apt::sources_list_d}/${sources_list_d_filename}": ensure => 'absent', - notify => Exec['apt_update'], + notify => Class['apt::update'], } } }