ini_file

Collection: community.general

Full Name: parallax.community.general.ini_file

Aliases: community.general.ini_file, ini_file

Synopsis

Manage ini file

Parameters

NameTypeRequiredDefaultDescription
pathstringyesPath to the INI-style file
sectionstringSection name in INI file. If state is absent without option, the entire section is removed
optionstringThe option name within the section to set or remove
valuestringThe value to set for the option
statestringpresentWhether the option should be present or absent Choices: present, absent
backupboolfalseCreate a backup file including the timestamp information
no_extra_spacesboolfalseDo not insert spaces before and after = sign
createbooltrueIf set to true and the file does not exist, the file is created
allow_no_valueboolfalseAllow option without value and without = sign

Example

- name: Example ini_file task
  ini_file:
    path: <your_path>