From 8d1fdc5c29d70027b0f1859145ced5ebb266cf9c Mon Sep 17 00:00:00 2001 From: Chris Price Date: Wed, 19 Sep 2012 15:42:16 -0700 Subject: Allow overriding separator string between key/val pairs This introduces a new parameter, 'key_val_separator', which can be set in order to override the string that is used as a separator between the key/value pair of a setting line. The default is ' = ', but you could set the param to '=' if you don't want to include whitespace in your settings file. --- lib/puppet/type/ini_setting.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/puppet/type') diff --git a/lib/puppet/type/ini_setting.rb b/lib/puppet/type/ini_setting.rb index 9af47c1..f1ab490 100644 --- a/lib/puppet/type/ini_setting.rb +++ b/lib/puppet/type/ini_setting.rb @@ -30,4 +30,11 @@ Puppet::Type.newtype(:ini_setting) do end end -end \ No newline at end of file + newparam(:key_val_separator) do + desc 'The separator string to use between each setting name and value. ' + + 'Defaults to " = ", but you could use this to override e.g. whether ' + + 'or not the separator should include whitespace.' + defaultto(" = ") + end + +end -- cgit v1.2.3