module-apt/manifests/preseeded_package.pp

19 lines
486 B
ObjectPascal
Raw Normal View History

2009-10-30 20:20:42 +01:00
define apt::preseeded_package ($content = "", $ensure = "installed") {
$seedfile = "/var/cache/local/preseeding/$name.seeds"
$real_content = $content ? {
2010-10-16 22:16:02 +02:00
"" => template ( "$name.seeds", "$debian_version/$name.seeds" ),
default => $content
2009-10-30 20:20:42 +01:00
}
file{ $seedfile:
content => $real_content,
mode => 0600, owner => root, group => root,
}
package { $name:
ensure => $ensure,
responsefile => $seedfile,
require => File[$seedfile],
}
}