Prevent add-apt-repository from running every time
Change-Id: Id9169a80a59c3de0fb3952955ad2cea502ded2b7 Reviewed-on: https://review.openstack.org/257 Reviewed-by: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
8ac4183ad9
commit
3a31943b1f
@ -1,4 +1,5 @@
|
||||
define apt::ppa($ensure = present) {
|
||||
$has_ppa = "/usr/bin/test -f /etc/apt/sources.list.d/`echo $name | cut -f2 -d: | sed 's/\//-/'`*list"
|
||||
case $ensure {
|
||||
present: {
|
||||
exec { "Add $name PPA":
|
||||
@ -8,6 +9,7 @@ define apt::ppa($ensure = present) {
|
||||
user => "root",
|
||||
group => "root",
|
||||
logoutput => on_failure,
|
||||
unless => "$has_ppa",
|
||||
}
|
||||
}
|
||||
absent: {
|
||||
@ -18,6 +20,7 @@ define apt::ppa($ensure = present) {
|
||||
user => "root",
|
||||
group => "root",
|
||||
logoutput => on_failure,
|
||||
unless => "$has_ppa",
|
||||
}
|
||||
}
|
||||
default: {
|
||||
|
Loading…
Reference in New Issue
Block a user