module-apt/manifests/preseeded_package.pp
Micah Anderson 72bb7b5ccb fix typo
2010-12-08 00:02:15 -05:00

18 lines
482 B
Puppet

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