]> gitweb.fluxo.info Git - puppet-concat.git/commitdiff
Fail with helpful advice if $::concat_basedir is not yet set
authorSharif Nassar <sharif@mediatemple.net>
Wed, 23 May 2012 21:35:08 +0000 (14:35 -0700)
committerSharif Nassar <sharif@mediatemple.net>
Wed, 23 May 2012 21:35:08 +0000 (14:35 -0700)
Building on the new docs in https://github.com/ripienaar/puppet-concat/pull/20

manifests/setup.pp

index fb755842e885aa391c73d92bbaa5f357c2aa0b80..38aeb9645bf8d56ca47f5d4dda77f9fe91161448 100644 (file)
@@ -18,7 +18,13 @@ class concat::setup {
     root    => 0,
     default => $id
   }
-  $concatdir = $::concat_basedir
+
+  if $::concat_basedir {
+    $concatdir = $::concat_basedir
+  } else {
+    fail ("\$concat_basedir not defined. Try running again with pluginsync enabled")
+  }
+
   $majorversion = regsubst($::puppetversion, '^[0-9]+[.]([0-9]+)[.][0-9]+$', '\1')
 
   file{"${concatdir}/bin/concatfragments.sh":