From: Nan Liu Date: Thu, 3 May 2012 16:51:14 +0000 (-0700) Subject: Cleanup apt-module puppet-lint related issues. X-Git-Tag: 0.0.3~6^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=17b9ac3c7f0aaf7322eae634fb0f35eb27bf872c;hp=-c;p=puppet-modules%2Fpuppetlabs-apt.git Cleanup apt-module puppet-lint related issues. --- 17b9ac3c7f0aaf7322eae634fb0f35eb27bf872c diff --git a/manifests/backports.pp b/manifests/backports.pp index 1526890..007a1ee 100644 --- a/manifests/backports.pp +++ b/manifests/backports.pp @@ -22,7 +22,7 @@ # # Copyright 2011 Puppet Labs Inc, unless otherwise noted. class apt::backports( - $release = $lsbdistcodename, + $release = $::lsbdistcodename, $location = $apt::params::backports_location ) inherits apt::params { @@ -31,16 +31,16 @@ class apt::backports( apt::source { 'backports.list': location => $location, release => "${release_real}-backports", - repos => $lsbdistid ? { + repos => $::lsbdistid ? { 'debian' => 'main contrib non-free', 'ubuntu' => 'universe multiverse restricted', }, - key => $lsbdistid ? { + key => $::lsbdistid ? { 'debian' => '55BE302B', 'ubuntu' => '437D05B5', }, key_server => 'pgp.mit.edu', pin => '200', - notify => Exec["apt_update"], + notify => Exec['apt_update'], } } diff --git a/manifests/builddep.pp b/manifests/builddep.pp index 8891bd9..de6191c 100644 --- a/manifests/builddep.pp +++ b/manifests/builddep.pp @@ -10,7 +10,7 @@ define apt::builddep() { } exec { "apt-builddep-${name}": - command => "/usr/bin/apt-get -y --force-yes build-dep $name", - notify => Exec["apt-update-${name}"], + command => "/usr/bin/apt-get -y --force-yes build-dep ${name}", + notify => Exec["apt-update-${name}"], } } diff --git a/manifests/conf.pp b/manifests/conf.pp index c1af710..fa7f97d 100644 --- a/manifests/conf.pp +++ b/manifests/conf.pp @@ -1,7 +1,7 @@ define apt::conf ( $priority = '50', $content - ) { +) { include apt::params diff --git a/manifests/init.pp b/manifests/init.pp index 068fb49..7d243ed 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -42,7 +42,7 @@ class apt( } $sources_list_content = $purge_sources_list ? { - false => undef, + false => undef, true => "# Repos managed by puppet.\n", } diff --git a/manifests/params.pp b/manifests/params.pp index 8e4fa93..ed698e7 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -5,12 +5,12 @@ class apt::params { $apt_conf_d = "${root}/apt.conf.d" $preferences_d = "${root}/preferences.d" - case $lsbdistid { + case $::lsbdistid { 'debian': { $backports_location = 'http://backports.debian.org/debian-backports' } 'ubuntu': { - case $lsbdistcodename { + case $::lsbdistcodename { 'hardy','lucid','maverick','natty','oneiric','precise': { $backports_location = 'http://us.archive.ubuntu.com/ubuntu' } diff --git a/manifests/ppa.pp b/manifests/ppa.pp index bda392c..d27aca4 100644 --- a/manifests/ppa.pp +++ b/manifests/ppa.pp @@ -1,7 +1,7 @@ # ppa.pp define apt::ppa( - $release = $lsbdistcodename + $release = $::lsbdistcodename ) { Class['apt'] -> Apt::Ppa[$title]