summaryrefslogtreecommitdiff
path: root/manifests/preseeded_package.pp
diff options
context:
space:
mode:
authorGabriel Filion <lelutin@gmail.com>2013-01-02 08:12:11 -0500
committerintrigeri <intrigeri@boum.org>2013-01-02 17:28:59 +0100
commitded81d8edcc9a7cc8275a68f669fde896379b12e (patch)
tree244f0fda87dc42ab62474b306fabcb658604342d /manifests/preseeded_package.pp
parent17f67d9fac83193f4436e82fc6046e065d9ab024 (diff)
Apply code style corrections from puppet-lint
Signed-off-by: Gabriel Filion <lelutin@gmail.com> + more linting by intrigeri. Conflicts: manifests/apticron.pp manifests/cron/dist_upgrade.pp manifests/cron/download.pp manifests/dist_upgrade/initiator.pp manifests/init.pp manifests/listchanges.pp manifests/preferences.pp manifests/preseeded_package.pp manifests/proxy_client.pp manifests/unattended_upgrades.pp manifests/update.pp
Diffstat (limited to 'manifests/preseeded_package.pp')
-rw-r--r--manifests/preseeded_package.pp26
1 files changed, 15 insertions, 11 deletions
diff --git a/manifests/preseeded_package.pp b/manifests/preseeded_package.pp
index ac9a821..9bca8b1 100644
--- a/manifests/preseeded_package.pp
+++ b/manifests/preseeded_package.pp
@@ -1,17 +1,21 @@
-define apt::preseeded_package ($content = "", $ensure = "installed") {
+define apt::preseeded_package (
+ $ensure = 'installed',
+ $content = ''
+) {
$seedfile = "/var/cache/local/preseeding/${name}.seeds"
+ $real_content = $content ? {
+ '' => template ( "site_apt/${::lsbdistcodename}/${name}.seeds" ),
+ default => $content
+ }
file { $seedfile:
- content => $content ? {
- "" => template ( "site_apt/${::lsbdistcodename}/${name}.seeds" ),
- default => $content
- },
- mode => 0600, owner => root, group => root,
- }
+ content => $real_content,
+ mode => '0600', owner => root, group => root,
+ }
package { $name:
- ensure => $ensure,
+ ensure => $ensure,
responsefile => $seedfile,
- require => File[$seedfile],
- }
-}
+ require => File[$seedfile],
+ }
+}