No description
Find a file
Chris Price 310a4b1575 Merge pull request #5 from jtopjian/jtopjian-colon
Added support for colons in section names
2012-09-04 10:27:39 -07:00
lib/puppet Added support for colons in section names 2012-08-24 08:37:08 +00:00
spec Added tests for sections with colons 2012-09-04 17:16:05 +00:00
tests final commit for 0.0.1 release 2012-08-16 21:50:20 -07:00
CHANGELOG Add CHANGELOG and update README; final commit for 0.0.2 release 2012-08-20 14:13:37 -07:00
Modulefile Add CHANGELOG and update README; final commit for 0.0.2 release 2012-08-20 14:13:37 -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 "".