X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Fppa.pp;h=bc8d486007980a1770884ffa91d8bce06b90b421;hb=944f9d5064382a3ab9ea5582d512e78950d5f8c0;hp=730bf7d198f452728097879841d83008f77531eb;hpb=e5e9ac0fd162d52689f794ab5c9c08217a5e4451;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/ppa.pp b/manifests/ppa.pp index 730bf7d..bc8d486 100644 --- a/manifests/ppa.pp +++ b/manifests/ppa.pp @@ -3,7 +3,7 @@ define apt::ppa( $ensure = 'present', $release = $::lsbdistcodename, - $options = '-y' + $options = $apt::params::ppa_options, ) { include apt::params include apt::update @@ -14,6 +14,10 @@ define apt::ppa( 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') @@ -45,6 +49,7 @@ define apt::ppa( environment => $proxy_env, command => "/usr/bin/add-apt-repository ${options} ${name}", unless => "/usr/bin/test -s ${sources_list_d}/${sources_list_d_filename}", + user => 'root', logoutput => 'on_failure', notify => Exec['apt_update'], require => [