This 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. intact.
You can set up custom child providers that inherit the `ini_setting` provider. This allows you to implement custom resources to manage INI settings for specific configuration files without copying all the code or writing your own code from scratch. This also allows resource purging to be used.
To implement child providers, you'll need to specify your own type. This type needs to implement a namevar (name) and a property called value:
For example:
```
#my_module/lib/puppet/type/glance_api_config.rb
Puppet::Type.newtype(:glance_api_config) do
ensurable
newparam(:name, :namevar => true) do
desc 'Section/setting name to manage from glance-api.conf'
*`ensure`: Ensures that the resource is present. Valid values are 'present', 'absent'.
*`key_val_separator`: The separator string to use between each setting name and value. Defaults to ' = ', but you could use this to override the default (e.g., whether or not the separator should include whitespace).
*`name`: An arbitrary name used as the identity of the resource.
*`provider`: The specific backend to use for this `ini_setting` resource. You will seldom need to specify this --- Puppet usually discovers the appropriate provider for your platform. The only available provider for `ini_setting` is ruby.
*`section`: The name of the INI file section in which the setting should be defined. Add a global section --- settings that appear at the beginning of the file, before any named sections --- by specifying a section name of "".
*`setting`: The name of the INI file setting to be defined.
*`value`: The value of the INI file setting to be defined.
###Type: ini_subsetting
#### Parameters
*`ensure`: Ensures that the resource is present. Valid values are 'present', 'absent'.
*`key_val_separator`: The separator string to use between each setting name and value. Defaults to ' = ', but you could use this to override the default (e.g., whether or not the separator should include whitespace).
*`name`: An arbitrary name used as the identity of the resource.
*`provider`: The specific backend to use for this `ini_subsetting` resource. You will seldom need to specify this --- Puppet usually discovers the appropriate provider for your platform. The only available provider for `ini_subsetting` is ruby.
*`quote_char`: The character used to quote the entire value of the setting. Valid values are '', '"', and "'". Defaults to ''.
*`section`: The name of the INI file section in which the setting should be defined. Add a global section --- settings that appear at the beginning of the file, before any named sections --- by specifying a section name of "".
*`setting`: The name of the INI file setting to be defined.
*`subsetting`: The name of the INI file subsetting to be defined.
*`subsetting_separator`: The separator string used between subsettings. Defaults to " ".
*`value`: The value of the INI file subsetting to be defined.
##Limitations
This module is officially [supported](https://forge.puppetlabs.com/supported) on :
* Red Hat Enterprise Linux (RHEL) 5, 6, 7
* CentOS 5, 6, 7
* Oracle Linux 5, 6, 7
* Scientific Linux 5, 6, 7
* SLES 11 SP1 or greater
* Debian 6, 7
* Ubuntu 10.04 LTS, 12.04 LTS, 14.04 LTS
* Solaris 10, 11
* Windows Server 2003/2008 R2, 2012/2012 R2
* AIX 5.3, 6.1, 7.1
This module has also been tested, but is not officially supported, on:
As of Puppet Enterprise 3.3, agent runs on master fail if you are using an older, manually installed version of inifile. To solve this problem, upgrade your inifile module to version 1.1.0 or later.
Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.
We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
The list of contributors can be found at: [https://github.com/puppetlabs/puppetlabs-inifile/graphs/contributors](https://github.com/puppetlabs/puppetlabs-inifile/graphs/contributors).