18 lines
482 B
Puppet
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],
|
|
}
|
|
}
|