module-apt/manifests/preseeded_package.pp
2009-10-30 20:20:42 +01:00

18 lines
466 B
Puppet

define apt::preseeded_package ($content = "", $ensure = "installed") {
$seedfile = "/var/cache/local/preseeding/$name.seeds"
$real_content = $content ? {
"" => template ( "$debian_version/$name.seeds" ),
Default => $content
}
file{ $seedfile:
content => $real_content,
mode => 0600, owner => root, group => root,
}
package { $name:
ensure => $ensure,
responsefile => $seedfile,
require => File[$seedfile],
}
}