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 | |
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')
-rw-r--r-- | manifests/package.pp | 25 | ||||
-rw-r--r-- | manifests/preseeded_package.pp | 25 |
2 files changed, 30 insertions, 20 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], + } +} diff --git a/manifests/preseeded_package.pp b/manifests/preseeded_package.pp index 29a981e..e1d1dcc 100644 --- a/manifests/preseeded_package.pp +++ b/manifests/preseeded_package.pp @@ -1,26 +1,11 @@ -# Install a package with a preseed file to automatically answer some questions. - +# This is a wrapper that will be removed after a while define apt::preseeded_package ( $ensure = 'present', $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], + warning('apt::preseeded_package is deprecated! you should now use apt::package instead.') + apt::package { $name: + ensure => $ensure, + content => $content, } } |