Hi there,
I like to have my environments organized into multiple subdirectories.
Puppet configuration supports that by defining multiple paths for
environmentpath setting, separated by ':'.
However, I find it very convenient to use this simple configuration line:
environmentpath = /etc/puppet/env/*
instead of this one:
environmentpath =
/etc/puppet/env/SUB1:/etc/puppet/env/SUB2:/etc/puppet/env/SUB3:/etc/puppet/env/SUBx
The patch for this convenience is a simple one-line change:
---------------------------------------------------------------------------
--- puppet/settings/path_setting.rb.ORIG 2015-03-08 19:05:33.758705374 +0000
+++ puppet/settings/path_setting.rb 2015-03-07 01:59:31.127330981 +0000
@@ -1,7 +1,7 @@
class Puppet::Settings::PathSetting < Puppet::Settings::StringSetting
def munge(value)
if value.is_a?(String)
- value = value.split(File::PATH_SEPARATOR).map { |d|
File.expand_path(d) }.join(File::PATH_SEPARATOR)
+ value = value.split(File::PATH_SEPARATOR).map { |d|
File.expand_path(d) }.map { |d| Dir.glob(d) }.join(File::PATH_SEPARATOR)
end
value
end
---------------------------------------------------------------------------
I haven't tested this with adding subdirs AFTER master is already started,
thought, but a simple 'touch puppetmaster.conf' should do the trick if new
directories are not picked up by default.
Would there be any interest for merging mentioned change upstream?
b.
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-dev/7d71c151-af1e-48bc-aa1f-f44cd4a74263%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.