From 0bbbe320ccd6df0b8e51b9b9dfc9debdf1e2654a Mon Sep 17 00:00:00 2001 From: Gildas Le Nadan Date: Sun, 20 May 2012 20:24:22 +0200 Subject: add information about concat_basedir and the need for pluginsync = true at least once --- README.markdown | 6 ++++++ manifests/init.pp | 12 ++++++++---- manifests/setup.pp | 6 +++--- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/README.markdown b/README.markdown index 1945150..bb9571a 100644 --- a/README.markdown +++ b/README.markdown @@ -81,6 +81,12 @@ Known Issues: in a run, the next run will also see it as changed. This is due to how 0.24.8 does the purging of unhandled files, this is improved in 0.25.x and we cannot work around it in our code. +* Since puppet-concat now relies on a fact for the concat directory, + you will need to set up pluginsync = true for at least the first run. + You have this issue if puppet fails to run on the client and you have + a message similar to + "err: Failed to apply catalog: Parameter path failed: File + paths must be fully qualified, not 'undef' at [...]/concat/manifests/setup.pp:44". Contributors: ------------- diff --git a/manifests/init.pp b/manifests/init.pp index 48aeec3..0b3ed56 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -31,10 +31,14 @@ # to control that and thus control the order the final file gets built in. # # SETUP: -# The class concat::setup defines a variable $concatdir - you should set this -# to a directory where you want all the temporary files and fragments to be -# stored. Avoid placing this somewhere like /tmp since you should never -# delete files here, puppet will manage them. +# The class concat::setup uses the fact concat_basedir to define the variable +# $concatdir, where all the temporary files and fragments will be +# durably stored. The fact concat_basedir will be set up on the client to +# /concat, so you will be able to run different setup/flavours +# of puppet clients. +# However, since this requires the file lib/facter/concat_basedir.rb to be +# deployed on the clients, so you will have to set "pluginsync = true" on +# both the master and client, at least for the first run. # # There's some regular expression magic to figure out the puppet version but # if you're on an older 0.24 version just set $puppetversion = 24 diff --git a/manifests/setup.pp b/manifests/setup.pp index ce3f7ea..fb75584 100644 --- a/manifests/setup.pp +++ b/manifests/setup.pp @@ -1,8 +1,8 @@ # Sets up the concat system. # -# $concatdir should point to a place where you wish the fragments to -# live. This should not be somewhere like /tmp since ideally these files -# should not be deleted ever, puppet should always manage them +# $concatdir is where the fragments live and is set on the fact concat_basedir. +# Since puppet should always manage files in $concatdir and they should +# not be deleted ever, /tmp is not an option. # # $puppetversion should be either 24 or 25 to enable a 24 compatible # mode, in 24 mode you might see phantom notifies this is a side effect -- cgit v1.2.3 From 21d0d2abf2542aaf2f60c9028a8f6653351af0e1 Mon Sep 17 00:00:00 2001 From: Sharif Nassar Date: Wed, 23 May 2012 14:35:08 -0700 Subject: Fail with helpful advice if $::concat_basedir is not yet set Building on the new docs in https://github.com/ripienaar/puppet-concat/pull/20 --- manifests/setup.pp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/manifests/setup.pp b/manifests/setup.pp index fb75584..38aeb96 100644 --- a/manifests/setup.pp +++ b/manifests/setup.pp @@ -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": -- cgit v1.2.3