Fixed ensure in apt::package
This commit is contained in:
parent
10845f8db5
commit
d9c26ac208
1 changed files with 5 additions and 2 deletions
|
@ -94,7 +94,7 @@ class apt::mirror {
|
||||||
# === Sample usage
|
# === Sample usage
|
||||||
#
|
#
|
||||||
# apt::package { "python-igraph":
|
# apt::package { "python-igraph":
|
||||||
# ensure => present,
|
# ensure => installed,
|
||||||
# source => "http://cneurocvs.rmki.kfki.hu/packages/binary/python-igraph_0.5.2_i386.deb",
|
# source => "http://cneurocvs.rmki.kfki.hu/packages/binary/python-igraph_0.5.2_i386.deb",
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
|
@ -105,7 +105,10 @@ define apt::package($ensure, $source) {
|
||||||
$filename = regsubst($source, '.*/([^/]+)$', '\1')
|
$filename = regsubst($source, '.*/([^/]+)$', '\1')
|
||||||
|
|
||||||
custom::file { "/var/cache/apt/local-archives/${filename}":
|
custom::file { "/var/cache/apt/local-archives/${filename}":
|
||||||
ensure => $ensure,
|
ensure => $ensure ? {
|
||||||
|
installed => present,
|
||||||
|
default => absent,
|
||||||
|
},
|
||||||
source => $source,
|
source => $source,
|
||||||
mode => 0644,
|
mode => 0644,
|
||||||
owner => root,
|
owner => root,
|
||||||
|
|
Loading…
Add table
Reference in a new issue