module-apt/manifests/preseeded_package.pp

22 lines
500 B
ObjectPascal
Raw Normal View History

define apt::preseeded_package (
$ensure = 'installed',
$content = ''
) {
2012-06-06 02:31:15 +02:00
$seedfile = "/var/cache/local/preseeding/${name}.seeds"
$real_content = $content ? {
'' => template ( "site_apt/${::debian_codename}/${name}.seeds" ),
default => $content
}
2009-10-30 20:20:42 +01:00
2010-12-07 19:18:41 +01:00
file { $seedfile:
content => $real_content,
mode => '0600', owner => root, group => root,
}
2009-10-30 20:20:42 +01:00
package { $name:
ensure => $ensure,
2009-10-30 20:20:42 +01:00
responsefile => $seedfile,
require => File[$seedfile],
}
}