2012-08-17 04:30:58 +02:00
|
|
|
# INI-file module #
|
|
|
|
|
|
|
|
This module provides resource types for use in managing INI-style configuration
|
|
|
|
files. The main resource type is `ini_setting`, which is used to manage an
|
|
|
|
individual setting in an INI file. Here's an example usage:
|
|
|
|
|
|
|
|
ini_setting { "sample setting":
|
|
|
|
path => '/tmp/foo.ini',
|
|
|
|
section => 'foo',
|
|
|
|
setting => 'foosetting',
|
|
|
|
value => 'FOO!',
|
|
|
|
ensure => present,
|
|
|
|
}
|
|
|
|
|
2013-02-15 10:56:44 +01:00
|
|
|
A supplementary resource type is `ini_subsetting`, which is used to manage
|
|
|
|
settings that consist of several arguments such as
|
|
|
|
|
|
|
|
JAVA_ARGS="-Xmx192m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/pe-puppetdb/puppetdb-oom.hprof "
|
|
|
|
|
|
|
|
ini_subsetting {'sample subsetting':
|
|
|
|
ensure => present,
|
|
|
|
section => '',
|
|
|
|
key_val_separator => '=',
|
|
|
|
path => '/etc/default/pe-puppetdb',
|
|
|
|
setting => 'JAVA_ARGS',
|
|
|
|
subsetting => '-Xmx',
|
|
|
|
value => '512m',
|
|
|
|
}
|
|
|
|
|
2012-08-17 04:30:58 +02:00
|
|
|
A few noteworthy features:
|
|
|
|
|
|
|
|
* The module tries *hard* not to manipulate your file any more than it needs to.
|
|
|
|
In most cases, it should leave the original whitespace, comments, ordering,
|
|
|
|
etc. perfectly intact.
|
|
|
|
* Supports comments starting with either '#' or ';'.
|
|
|
|
* Will add missing sections if they don't exist.
|
2012-08-20 23:10:39 +02:00
|
|
|
* Supports a "global" section (settings that go at the beginning of the file,
|
|
|
|
before any named sections) by specifying a section name of "".
|
2012-08-17 04:30:58 +02:00
|
|
|
|