module-puppetlabs-apt/manifests/ppa.pp

22 lines
574 B
ObjectPascal
Raw Normal View History

2010-04-27 22:38:28 +02:00
# ppa.pp
define apt::ppa() {
2011-03-11 18:02:50 +01:00
Class['apt'] -> Apt::Ppa[$title]
2011-03-11 18:02:50 +01:00
exec { "apt-update-${name}":
command => "/usr/bin/aptitude update",
refreshonly => true,
}
exec { "add-apt-repository-${name}":
command => "/usr/bin/add-apt-repository ${name}",
notify => Exec["apt-update-${name}"],
unless => $name? {
/ppa:(.*)/ => "/bin/cat /etc/apt/sources.list /etc/apt/sources.list.d/* | /bin/egrep '^[^#].*ppa.*$1.*$'",
default => "/bin/cat /etc/apt/sources.list /etc/apt/sources.list.d/* | /bin/egrep '^[^#].*${title}.*$'",
}
}
2010-04-27 22:38:28 +02:00
}