Fix some Puppet Lint errors
authorMatthias Baur <matthias.baur@dmc.de>
Fri, 5 Sep 2014 16:51:39 +0000 (18:51 +0200)
committerMatthias Baur <matthias.baur@dmc.de>
Fri, 5 Sep 2014 16:51:39 +0000 (18:51 +0200)
manifests/init.pp
manifests/params.pp
manifests/ppa.pp

index 1c318b67ca979259ef79933b6b0faf2dedb85f7d..eb8c709babcbefb020ecad42c9f736216f1ec232 100644 (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.
index d57b80110c8209d4511a722120096a7ae721a4b2..a90d2b4ed60d7eb1b0b5af8a3a1619d7623d5792 100644 (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
         }
       }
     }
index 5f5c6ae57421993afa99705d3d63b6de081fd066..0fdcc95f3a9902ea7f1335a6219823e146f7dc48 100644 (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],
         ],