The quote_char is used to quote the entire setting when it is modified
as a result of changes to some subsettings.
For an example let's assume we have a setting of this form:
JAVA_ARGS=-Xmx256m
and we want to add the '-Xms' parameter to the setting, for that purpose
we define a resource like this:
ini_subsetting { '-Xms':
ensure => present,
path => '/some/config/file',
section => '',
setting => 'JAVA_ARGS',
subsetting => '-Xms'
value => '256m',
}
which results into the following setting:
JAVA_ARGS=-Xmx256m -Xms256m
But this is not what we intended - if this setting is read by the bash
shell the '-Xms256m' parameter is interpreted as a command to be
executed rather than a value to be assigned to the JAVA_ARGS variable.
To fix this problem the quote_char parameter was added to the
ini_subsetting resource type, and we'll take advantage of it to fix the
problem in the above example like so:
ini_subsetting { '-Xms':
ensure => present,
path => '/some/config/file',
section => '',
setting => 'JAVA_ARGS',
quote_char => '"',
subsetting => '-Xms'
value => '256m',
}
which will result into:
JAVA_ARGS="-Xmx256m -Xms256m"
which is what we intended.
This commit converts value to a property so that it
can be managed and modified when a file already has
a value set.
It was previously treating the line creation state
the same as the update case, which is not in
alignment with Puppet's model.
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.