ANSIBLE.INI_FILE(3)             ANSIBLE MODULES            ANSIBLE.INI_FILE(3)



NAME
       ini_file - Tweak settings in INI files

DESCRIPTION
       Manage (add, remove, change) individual settings in an INI-style file
       without having to manage the file as a whole with, say, template or
       assemble. Adds missing sections if they don't exist.

OPTIONS
       backup Create a backup file including the timestamp information so you
              can get the original file back if you somehow clobbered it
              incorrectly.  Choices: yes,no.

       dest   Path to the INI-style file; this file is created if
              required(required)

       option if set (required for changing a value), this is the name of the
              option.May be omitted if adding/removing a whole section.

       others all arguments accepted by the file module also work here

       section
              Section name in INI file. This is added if state=present
              automatically when a single value is being set.(required)

       value  the string value to be associated with an option. May be omitted
              when removing an option.."

NOTES
       While it is possible to add an option without specifying a value, this
       makes no sense.

       A section named default cannot be added by the module, but if it
       exists, individual options within the section can be updated. (This is
       a limitation of Python's ConfigParser.) Either use template to create a
       base INI file with a [default] section, or use lineinfile to add the
       missing line.

EXAMPLES
       Ensure fav=lemonade is in section [drinks] in said file

       ini_file: dest=/etc/conf section=drinks option=fav value=lemonade mode=0600 backup=yes

       ini_file: dest=/etc/anotherconf
                 section=drinks
                 option=temperature
                 value=cold
                 backup=yes


AUTHOR
       Jan-Piet Mens

SEE ALSO
       ansible(1), http://ansible.github.com/modules.html#ini-file



0.9                               2012-11-30               ANSIBLE.INI_FILE(3)
