No description
Find a file
Reid Vandewiele 3829e20c49 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.
2012-09-29 12:39:00 -07:00
lib/puppet Allow values with spaces to be parsed and set 2012-09-29 12:39:00 -07:00
spec Allow values with spaces to be parsed and set 2012-09-29 12:39:00 -07:00
tests Allow overriding separator string between key/val pairs 2012-09-19 15:42:16 -07:00
CHANGELOG Updated CHANGELOG and Modulefile; final commit for 0.0.3 release 2012-09-24 10:20:45 -07:00
Modulefile Updated CHANGELOG and Modulefile; final commit for 0.0.3 release 2012-09-24 10:20:45 -07:00
README.markdown Add CHANGELOG and update README; final commit for 0.0.2 release 2012-08-20 14:13:37 -07: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,
}

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.
  • Supports a "global" section (settings that go at the beginning of the file, before any named sections) by specifying a section name of "".