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-08-18 07:37:54 +02:00
|
|
|
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]}'))",
|
|
|
|
}
|
|
|
|
|
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}"],
|
|
|
|
}
|
2010-04-27 22:38:28 +02:00
|
|
|
}
|
|
|
|
|