From: Erik Dalén Date: Tue, 21 Aug 2012 20:55:24 +0000 (+0200) Subject: Fix style errors X-Git-Tag: 1.0.0~9^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=a3d782c3b5cf128b3ef8e910ef42297a38a96a02;p=puppet-modules%2Fpuppetlabs-apt.git Fix style errors --- diff --git a/manifests/backports.pp b/manifests/backports.pp index aafdf96..e9180c4 100644 --- a/manifests/backports.pp +++ b/manifests/backports.pp @@ -16,7 +16,8 @@ # # == Authors # -# Ben Hughes, I think. At least blame him if this goes wrong. I just added puppet doc. +# Ben Hughes, I think. At least blame him if this goes wrong. +# I just added puppet doc. # # == Copyright # @@ -27,18 +28,20 @@ class apt::backports( ) inherits apt::params { $release_real = downcase($release) + $key = $::lsbdistid ? { + 'debian' => '55BE302B', + 'ubuntu' => '437D05B5', + } + $repos = $::lsbdistid ? { + 'debian' => 'main contrib non-free', + 'ubuntu' => 'main universe multiverse restricted', + } apt::source { 'backports': location => $location, release => "${release_real}-backports", - repos => $::lsbdistid ? { - 'debian' => 'main contrib non-free', - 'ubuntu' => 'main universe multiverse restricted', - }, - key => $::lsbdistid ? { - 'debian' => '55BE302B', - 'ubuntu' => '437D05B5', - }, + repos => $repos, + key => $key, key_server => 'pgp.mit.edu', pin => '200', } diff --git a/manifests/conf.pp b/manifests/conf.pp index 03aab8e..3c4cb19 100644 --- a/manifests/conf.pp +++ b/manifests/conf.pp @@ -1,7 +1,7 @@ define apt::conf ( + $content, $ensure = present, - $priority = '50', - $content + $priority = '50' ) { include apt::params diff --git a/manifests/init.pp b/manifests/init.pp index 3587d21..442e04c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -108,7 +108,7 @@ class apt( } # Need anchor to provide containment for dependencies. - anchor { "apt::update": + anchor { 'apt::update': require => Class['apt::update'], } } diff --git a/manifests/key.pp b/manifests/key.pp index dbbed2b..98a0f3a 100644 --- a/manifests/key.pp +++ b/manifests/key.pp @@ -54,7 +54,7 @@ define apt::key ( } } - Anchor["apt::key $upkey present"] -> Anchor["apt::key/$title"] + Anchor["apt::key ${upkey} present"] -> Anchor["apt::key/${title}"] } absent: { diff --git a/manifests/pin.pp b/manifests/pin.pp index 14df14b..4ef8953 100644 --- a/manifests/pin.pp +++ b/manifests/pin.pp @@ -30,6 +30,6 @@ define apt::pin( owner => root, group => root, mode => '0644', - content => template("apt/pin.pref.erb"), + content => template('apt/pin.pref.erb'), } } diff --git a/manifests/ppa.pp b/manifests/ppa.pp index 9527e0d..0458589 100644 --- a/manifests/ppa.pp +++ b/manifests/ppa.pp @@ -25,8 +25,10 @@ define apt::ppa( command => "/usr/bin/add-apt-repository ${name}", creates => "${sources_list_d}/${sources_list_d_filename}", logoutput => 'on_failure', - require => [ File[$sources_list_d], - Package['python-software-properties'] ], + require => [ + File[$sources_list_d], + Package['python-software-properties'], + ], notify => Exec['apt_update'], } diff --git a/tests/key.pp b/tests/key.pp index 5c62a4c..92679cf 100644 --- a/tests/key.pp +++ b/tests/key.pp @@ -1,5 +1,5 @@ # Declare Apt key for apt.puppetlabs.com source -apt::key { "puppetlabs": - key => "4BD6EC30", - key_server => "pgp.mit.edu", +apt::key { 'puppetlabs': + key => '4BD6EC30', + key_server => 'pgp.mit.edu', }