From 3829e20c49652660aeac5c33f638dd19dca41f8e Mon Sep 17 00:00:00 2001 From: Reid Vandewiele Date: Sat, 29 Sep 2012 12:39:00 -0700 Subject: Allow values with spaces to be parsed and set Previously, the following stanza would fail as a result of the ini_setting type not being able to parse spaces in setting values. ini_setting { 'main_config_version': ensure => present, path => '/etc/puppetlabs/puppet/puppet.conf', section => 'main', setting => 'config_version', value => '/etc/puppetlabs/puppet/config_version.sh $environment', } This commit modifes the SETTING_REGEX to account for spaces in setting values. --- lib/puppet/util/ini_file.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/puppet/util/ini_file.rb b/lib/puppet/util/ini_file.rb index 36bc8a6..b2e554f 100644 --- a/lib/puppet/util/ini_file.rb +++ b/lib/puppet/util/ini_file.rb @@ -6,7 +6,7 @@ module Util class IniFile SECTION_REGEX = /^\s*\[([\w\d\.\\\/\-\:]+)\]\s*$/ - SETTING_REGEX = /^\s*([\w\d\.\\\/\-]+)\s*=\s*([\S]+)\s*$/ + SETTING_REGEX = /^\s*([\w\d\.\\\/\-]+)\s*=\s*([\S\s]*\S)\s*$/ def initialize(path, key_val_separator = ' = ') @path = path -- cgit v1.2.3