]> gitweb.fluxo.info Git - puppet-concat.git/commitdiff
Fixes various puppet-lint warnings.
authorJan Vansteenkiste <jan@vstone.eu>
Thu, 30 Aug 2012 10:33:50 +0000 (12:33 +0200)
committerJan Vansteenkiste <jan@vstone.eu>
Thu, 30 Aug 2012 10:33:50 +0000 (12:33 +0200)
* ./manifests/init.pp - WARNING: ensure found on line but it's not the first attribute on line 222
* ./manifests/setup.pp - WARNING: selector inside resource block on line 34
* ./manifests/fragment.pp - WARNING: case statement without a default case on line 28

manifests/fragment.pp
manifests/init.pp
manifests/setup.pp

index 908d565578c161e835bff16ff1c0c1f2ff26b1b2..68bfd9be13a7c04a4fb6a4b5d2950623c7c57567 100644 (file)
@@ -29,6 +29,9 @@ define concat::fragment($target, $content='', $source='', $order=10, $ensure = '
             '', 'absent', 'present', 'file', 'directory': {
               crit('No content, source or symlink specified')
             }
+            default: {
+              #do nothing, make puppet-lint happy.
+            }
           }
         }
         default: { File{ source => $source } }
index 8398e92095067f123e9b26599cd0ff3ff496429f..960098d4be1a6f0838ef18f3c7f5caf0a1721ba6 100644 (file)
@@ -218,8 +218,8 @@ define concat(
   }
 
   file { $name:
-    path     => $path,
     ensure   => present,
+    path     => $path,
     alias    => "concat_${name}",
     group    => $group,
     mode     => $mode,
index 38aeb9645bf8d56ca47f5d4dda77f9fe91161448..fc6cb93eafc0c20b4b7ee4882ad55e1f9db335a6 100644 (file)
@@ -26,15 +26,16 @@ class concat::setup {
   }
 
   $majorversion = regsubst($::puppetversion, '^[0-9]+[.]([0-9]+)[.][0-9]+$', '\1')
+  $fragments_source = $majorversion ? {
+    24      => 'puppet:///concat/concatfragments.sh',
+    default => 'puppet:///modules/concat/concatfragments.sh'
+  }
 
   file{"${concatdir}/bin/concatfragments.sh":
     owner  => $id,
     group  => $root_group,
     mode   => '0755',
-    source => $majorversion ? {
-      24      => 'puppet:///concat/concatfragments.sh',
-      default => 'puppet:///modules/concat/concatfragments.sh'
-    };
+    source => $fragments_source;
 
   [ $concatdir, "${concatdir}/bin" ]:
     ensure => directory,