X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Fppa.pp;h=8a3b6f5f594e136113d697f5e89e73eeb61213f0;hb=4c9174e51728503c99d2ce224b5443a3c4286df3;hp=730bf7d198f452728097879841d83008f77531eb;hpb=9d32257f8500ba219fc84c0ab174333f49a0e0d5;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/ppa.pp b/manifests/ppa.pp index 730bf7d..8a3b6f5 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 => [ @@ -62,6 +67,9 @@ define apt::ppa( file { "${sources_list_d}/${sources_list_d_filename}": ensure => 'absent', + mode => '0644', + owner => 'root', + gruop => 'root', notify => Exec['apt_update'], } }