From: Robert Navarro Date: Thu, 18 Aug 2011 05:37:54 +0000 (-0300) Subject: Added some crazy bash madness to check if the ppa is installed already. Otherwise... X-Git-Tag: 0.0.1~21^2~1 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=1af9a13c40c33e1ab8fb56f33cb9aa5e16cead0e;hp=52ca73e964bc5200206efb0f0288acc1e4a6f88c;p=puppet-modules%2Fpuppetlabs-apt.git Added some crazy bash madness to check if the ppa is installed already. Otherwise the manifest tries to add it on every run! --- diff --git a/manifests/ppa.pp b/manifests/ppa.pp index 8dcea85..1576927 100644 --- a/manifests/ppa.pp +++ b/manifests/ppa.pp @@ -4,6 +4,10 @@ define apt::ppa() { Class['apt'] -> Apt::Ppa[$title] + Exec { + onlyif => "/usr/bin/test ! $(/bin/ls /etc/apt/sources.list.d | /bin/grep -v $(echo \"${title}\" | /usr/bin/gawk 'match(\$0, /^ppa:(.*)\/(.*)$/, vals) {printf \"%s-%s\", vals[1], vals[2]}'))", + } + exec { "apt-update-${name}": command => "/usr/bin/aptitude update", refreshonly => true,