diff options
author | Gabriel Filion <gabster@lelutin.ca> | 2017-02-24 13:03:59 -0500 |
---|---|---|
committer | Gabriel Filion <gabster@lelutin.ca> | 2017-02-24 15:34:09 -0500 |
commit | dfbfc7a05f7ac6713b4ac1379cfb6e2cefa85093 (patch) | |
tree | f8b7141257f8388b403ad102a17882b6c4a4f229 /manifests/package.pp | |
parent | 23355eeeffcd9663fb974a84602aeb999653f047 (diff) |
rename preseeded_package into package
keep a wrapper in place with a deprecation notice for the old name so
that ppl can know about the change and migrate to the new name
Diffstat (limited to 'manifests/package.pp')
-rw-r--r-- | manifests/package.pp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/manifests/package.pp b/manifests/package.pp new file mode 100644 index 0000000..b2ae79d --- /dev/null +++ b/manifests/package.pp @@ -0,0 +1,25 @@ +# Install a package with a preseed file to automatically answer some questions. +define apt::package ( + $ensure = 'present', + $seedfile_content = '', +) { + + $seedfile = "/var/cache/local/preseeding/${name}.seeds" + $real_seedfile_content = $seedfile_content ? { + '' => template ( "site_apt/${::debian_codename}/${name}.seeds" ), + default => $seedfile_content, + } + + file { $seedfile: + content => $real_seedfile_content, + mode => '0600', + owner => 'root', + group => 0, + } + + package { $name: + ensure => $ensure, + responsefile => $seedfile, + require => File[$seedfile], + } +} |