Manage (add, remove, change) individual settings in an INI-style file without having to manage the file as a whole with, say, M(template) or M(assemble). Adds missing sections if they don't exist. ,Before version 2.0, comments are discarded when the source file is read, and therefore will not show up in the destination file.


dest Path to the INI-style file; this file is created if required true
section Section name in INI file. This is added if C(state=present) automatically when a single value is being set. true
  • if set (required for changing a I(value)), this is the name of the option.
  • May be omitted if adding/removing a whole I(section).
value the string value to be associated with an I(option). May be omitted when removing an I(option).
backup Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly.
  • yes
  • no
others all arguments accepted by the M(file) module also work here
state If set to C(absent) the option or section will be removed if present instead of created.
  • present
  • absent


Jan-Piet Mens (@jpmens) ,Ales Nosek (@noseka1)