module-apt/manifests/preseeded_package.pp

18 lines
464 B
ObjectPascal
Raw Normal View History

2009-10-30 20:20:42 +01:00
define apt::preseeded_package ($content = "", $ensure = "installed") {
2012-06-06 02:31:15 +02:00
$seedfile = "/var/cache/local/preseeding/${name}.seeds"
2009-10-30 20:20:42 +01:00
2010-12-07 19:18:41 +01:00
file { $seedfile:
2012-06-06 02:31:15 +02:00
content => $content ? {
"" => template ( "site_apt/${::lsbdistcodename}/${name}.seeds" ),
default => $content
},
2009-10-30 20:20:42 +01:00
mode => 0600, owner => root, group => root,
}
package { $name:
ensure => $ensure,
responsefile => $seedfile,
require => File[$seedfile],
}
}