community.windows
community.windows copied to clipboard
New Module win_ini_file
SUMMARY
create windows equivalent of https://docs.ansible.com/ansible/2.5/modules/ini_file_module.html
ISSUE TYPE
- Feature Idea
COMPONENT NAME
Windows Operating systems have loads of INI files. It would be nice to have the same features as linux systems. this is also helpful when defining MS SQL servers and other apps on windows.
ADDITIONAL INFORMATION
- name: Ensure "fav=lemonade is in section "[drinks]" in specified file
community.windows.win_ini_file:
path: c:\path\to\file.ini
section: drinks
option: fav
value: lemonade
backup: yes
I think win_template can be used to create ini files. It gives more flexibility with jinja2
@kvprasoon I agree you can use jinja2 with win_template but on linux side we have the feature and it would be nice to have parity. I also favor the idea of having clarity in code of what exactly is being done. the template will do it.. but adds a layer of complexity for someone new to the code to understand what you are changing on the os.
As per the README https://github.com/ansible-collections/community.windows#contributing-to-this-collection this collection is currently only accepting bugfixes or features to existing modules.