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-12-08 06:02:15 +01:00
|
|
|
"" => template ( "site-apt/$lsbdistcodename/$name.seeds" ),
|
2010-10-16 22:16:02 +02:00
|
|
|
default => $content
|
2009-10-30 20:20:42 +01:00
|
|
|
}
|
|
|
|
|
2010-12-07 19:18:41 +01:00
|
|
|
file { $seedfile:
|
2009-10-30 20:20:42 +01:00
|
|
|
content => $real_content,
|
|
|
|
mode => 0600, owner => root, group => root,
|
|
|
|
}
|
|
|
|
|
|
|
|
package { $name:
|
|
|
|
ensure => $ensure,
|
|
|
|
responsefile => $seedfile,
|
|
|
|
require => File[$seedfile],
|
|
|
|
}
|
|
|
|
}
|