module-apt/manifests/preseeded_package.pp
Gabriel Filion 2bbfe8cab9 Fix some minor lint issues
This was shown by the testing that was added in merge request !34
2016-06-29 17:31:14 +02:00

24 righe
591 B
Puppet

# Install a package with a preseed file to automatically answer some questions.
define apt::preseeded_package (
$ensure = 'installed',
$content = ''
) {
$seedfile = "/var/cache/local/preseeding/${name}.seeds"
$real_content = $content ? {
'' => template ( "site_apt/${::debian_codename}/${name}.seeds" ),
default => $content
}
file { $seedfile:
content => $real_content,
mode => '0600',
owner => 'root',
group => 0,
}
package { $name:
ensure => $ensure,
responsefile => $seedfile,
require => File[$seedfile],
}
}