Support ability to add more than one PPA
This commit is contained in:
parent
420d537ac1
commit
ed2d19e2f3
2 changed files with 8 additions and 8 deletions
|
@ -4,6 +4,8 @@ class apt {
|
||||||
$root = '/etc/apt'
|
$root = '/etc/apt'
|
||||||
$provider = '/usr/bin/apt-get'
|
$provider = '/usr/bin/apt-get'
|
||||||
|
|
||||||
|
package { "python-software-properties": }
|
||||||
|
|
||||||
file { "sources.list":
|
file { "sources.list":
|
||||||
name => "${root}/sources.list",
|
name => "${root}/sources.list",
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
|
|
@ -3,18 +3,16 @@
|
||||||
define apt::ppa(
|
define apt::ppa(
|
||||||
|
|
||||||
) {
|
) {
|
||||||
include apt
|
require apt
|
||||||
|
|
||||||
package { "python-software-properties": }
|
exec { "apt-update-${name}":
|
||||||
|
command => "/usr/bin/aptitude update",
|
||||||
exec { "apt-update":
|
|
||||||
command => "/usr/bin/apt-get update",
|
|
||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { "/usr/bin/add-apt-repository ${name}":
|
exec { "add-apt-repository-${name}":
|
||||||
require => Package["python-software-properties"],
|
command => "/usr/bin/add-apt-repository ${name}",
|
||||||
notify => Exec["apt-update"]
|
notify => Exec["apt-update-${name}"],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue