2010-04-27 22:38:28 +02:00
|
|
|
# ppa.pp
|
|
|
|
|
2011-05-30 19:22:04 +02:00
|
|
|
define apt::ppa() {
|
2011-03-11 18:02:50 +01:00
|
|
|
|
2011-05-30 19:22:04 +02:00
|
|
|
Class['apt'] -> Apt::Ppa[$title]
|
2011-03-11 18:02:50 +01:00
|
|
|
|
2011-05-30 19:24:06 +02:00
|
|
|
exec { "apt-update-${name}":
|
|
|
|
command => "/usr/bin/aptitude update",
|
|
|
|
refreshonly => true,
|
|
|
|
}
|
2011-03-11 19:14:31 +01:00
|
|
|
|
2011-05-30 19:24:06 +02:00
|
|
|
exec { "add-apt-repository-${name}":
|
|
|
|
command => "/usr/bin/add-apt-repository ${name}",
|
|
|
|
notify => Exec["apt-update-${name}"],
|
2011-11-02 15:40:10 +01:00
|
|
|
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}.*$'",
|
|
|
|
}
|
2011-05-30 19:24:06 +02:00
|
|
|
}
|
2010-04-27 22:38:28 +02:00
|
|
|
}
|
|
|
|
|