Merge pull request #356 from digitalmediacenter/fix_puppet_lint_errors

Fix some Puppet Lint errors
This commit is contained in:
Daniele Sluijters 2014-09-05 19:23:01 +02:00
commit 32e2b6c480
3 changed files with 23 additions and 23 deletions

View file

@ -89,8 +89,8 @@ class apt(
if $purge_preferences {
file { 'apt-preferences':
ensure => absent,
path => "${root}/preferences",
ensure => absent,
path => "${root}/preferences",
}
}
@ -113,8 +113,8 @@ class apt(
}
false: {
file { '99progressbar':
ensure => absent,
path => "${apt_conf_d}/99progressbar",
ensure => absent,
path => "${apt_conf_d}/99progressbar",
}
}
undef: {} # do nothing
@ -142,9 +142,9 @@ class apt(
case $proxy_host {
false, '', undef: {
file { '01proxy':
ensure => absent,
path => "${apt_conf_d}/01proxy",
notify => Exec['apt_update'],
ensure => absent,
path => "${apt_conf_d}/01proxy",
notify => Exec['apt_update'],
}
}
default: {
@ -161,9 +161,9 @@ class apt(
}
file { 'old-proxy-file':
ensure => absent,
path => "${apt_conf_d}/proxy",
notify => Exec['apt_update'],
ensure => absent,
path => "${apt_conf_d}/proxy",
notify => Exec['apt_update'],
}
# Need anchor to provide containment for dependencies.

View file

@ -11,9 +11,9 @@ class apt::params {
'squeeze': {
$backports_location = 'http://backports.debian.org/debian-backports'
$legacy_origin = true
$origins = ['${distro_id} oldstable',
'${distro_id} ${distro_codename}-security',
'${distro_id} ${distro_codename}-lts']
$origins = ['${distro_id} oldstable', #lint:ignore:single_quote_string_with_variables
'${distro_id} ${distro_codename}-security', #lint:ignore:single_quote_string_with_variables
'${distro_id} ${distro_codename}-lts'] #lint:ignore:single_quote_string_with_variables
}
'wheezy': {
$backports_location = 'http://ftp.debian.org/debian/'
@ -33,19 +33,19 @@ class apt::params {
$backports_location = 'http://us.archive.ubuntu.com/ubuntu'
$ppa_options = undef
$legacy_origin = true
$origins = ['${distro_id} ${distro_codename}-security']
$origins = ['${distro_id} ${distro_codename}-security'] #lint:ignore:single_quote_string_with_variables
}
'precise', 'trusty': {
$backports_location = 'http://us.archive.ubuntu.com/ubuntu'
$ppa_options = '-y'
$legacy_origin = true
$origins = ['${distro_id}:${distro_codename}-security']
$origins = ['${distro_id}:${distro_codename}-security'] #lint:ignore:single_quote_string_with_variables
}
default: {
$backports_location = 'http://old-releases.ubuntu.com/ubuntu'
$ppa_options = '-y'
$legacy_origin = true
$origins = ['${distro_id}:${distro_codename}-security']
$origins = ['${distro_id}:${distro_codename}-security'] #lint:ignore:single_quote_string_with_variables
}
}
}

View file

@ -48,13 +48,13 @@ define apt::ppa(
$proxy_env = []
}
exec { "add-apt-repository-${name}":
environment => $proxy_env,
command => "/usr/bin/add-apt-repository ${options} ${name}",
unless => "/usr/bin/test -s ${sources_list_d}/${sources_list_d_filename}",
user => 'root',
logoutput => 'on_failure',
notify => Exec['apt_update'],
require => [
environment => $proxy_env,
command => "/usr/bin/add-apt-repository ${options} ${name}",
unless => "/usr/bin/test -s ${sources_list_d}/${sources_list_d_filename}",
user => 'root',
logoutput => 'on_failure',
notify => Exec['apt_update'],
require => [
File['sources.list.d'],
Package[$package],
],