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