d007a40333
* Removes dependency on lsb-release and/or Facter >1.7 (values are based on $::lsbdistcodename, when available) * Simplifies maintenance: only lib/facter/util/* require updates as new releases are made Caveats: * apt::codename is removed; to override debian_* facts, set the FACTER_debian_codename environment variable for puppet * If tracking unstable, make sure lsb-release is installed, as other methods can't tell between testing and unstable
21 righe
500 B
Puppet
21 righe
500 B
Puppet
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 => root,
|
|
}
|
|
|
|
package { $name:
|
|
ensure => $ensure,
|
|
responsefile => $seedfile,
|
|
require => File[$seedfile],
|
|
}
|
|
}
|