Fixed typos from apt::ppa.
This commit is contained in:
parent
c31e4360f4
commit
d779ddfc40
1 changed files with 4 additions and 3 deletions
|
@ -45,21 +45,22 @@ define apt::ppa($ensure = "present") {
|
||||||
|
|
||||||
tag("bootstrap")
|
tag("bootstrap")
|
||||||
|
|
||||||
|
include apt
|
||||||
include apt::ppa::helper
|
include apt::ppa::helper
|
||||||
$fname = gsub($name, "^ppa:([^\/]+)\/(.+)", "\\1-\\2-${lsbdistcodename}.list")
|
$fname = regsubst($name, "^ppa:([^\/]+)\/(.+)", "\\1-\\2-${lsbdistcodename}.list")
|
||||||
|
|
||||||
case $ensure {
|
case $ensure {
|
||||||
"present": {
|
"present": {
|
||||||
exec { "add-apt-repository ${name}":
|
exec { "add-apt-repository ${name}":
|
||||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||||
user => "root",
|
user => "root",
|
||||||
creates => $fname,
|
creates => "/etc/apt/sources.list.d/${fname}",
|
||||||
require => Package["python-software-properties"],
|
require => Package["python-software-properties"],
|
||||||
notify => Exec["apt-get-update"],
|
notify => Exec["apt-get-update"],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"absent": {
|
"absent": {
|
||||||
file { $fname:
|
file { "/etc/apt/sources.list.d/${fname}":
|
||||||
ensure => absent,
|
ensure => absent,
|
||||||
notify => Exec["apt-get-update"],
|
notify => Exec["apt-get-update"],
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue