diff options
author | Gabriel Filion <lelutin@gmail.com> | 2013-01-02 08:12:11 -0500 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2013-01-02 17:28:59 +0100 |
commit | ded81d8edcc9a7cc8275a68f669fde896379b12e (patch) | |
tree | 244f0fda87dc42ab62474b306fabcb658604342d /manifests/preferences_snippet.pp | |
parent | 17f67d9fac83193f4436e82fc6046e065d9ab024 (diff) | |
download | puppet-apt-ded81d8edcc9a7cc8275a68f669fde896379b12e.tar.gz puppet-apt-ded81d8edcc9a7cc8275a68f669fde896379b12e.tar.bz2 |
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/preferences_snippet.pp')
-rw-r--r-- | manifests/preferences_snippet.pp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/manifests/preferences_snippet.pp b/manifests/preferences_snippet.pp index 1aafe57..0bff85c 100644 --- a/manifests/preferences_snippet.pp +++ b/manifests/preferences_snippet.pp @@ -1,11 +1,11 @@ -define apt::preferences_snippet( +define apt::preferences_snippet ( + $priority, $package = false, $ensure = 'present', $source = '', $release = '', - $pin = '', - $priority ) -{ + $pin = '' +) { $real_package = $package ? { false => $name, @@ -13,19 +13,19 @@ define apt::preferences_snippet( } if $custom_preferences == false { - fail("Trying to define a preferences_snippet with \$custom_preferences set to false.") + fail('Trying to define a preferences_snippet with $custom_preferences set to false.') } if !$pin and !$release { - fail("apt::preferences_snippet requires one of the 'pin' or 'release' argument to be set") + fail('apt::preferences_snippet requires one of the \'pin\' or \'release\' argument to be set') } if $pin and $release { - fail("apt::preferences_snippet requires either a 'pin' or 'release' argument, not both") + fail('apt::preferences_snippet requires either a \'pin\' or \'release\' argument, not both') } file { "/etc/apt/preferences.d/${name}": ensure => $ensure, - owner => root, group => 0, mode => 0644; + owner => root, group => 0, mode => '0644'; } # This should really work in the same manner as sources_list and apt_conf @@ -36,12 +36,12 @@ define apt::preferences_snippet( case $release { '': { File["/etc/apt/preferences.d/${name}"]{ - content => template("apt/preferences_snippet.erb") + content => template('apt/preferences_snippet.erb') } } default: { File["/etc/apt/preferences.d/${name}"]{ - content => template("apt/preferences_snippet_release.erb") + content => template('apt/preferences_snippet_release.erb') } } } |