Hi Joe,
thanks for your reply and sorry that I am catching up so late.
I thought about using win_template but I does not work for me, as I do not have all the necessary input at that point to assemble the whole file myself. It would require shifting quite some application knowledge which is just not feasible (yet).
Nevertheless, thanks for the suggestion.
Instead I started working on the win_blockinfile module. It is basically a Windows port of the existing blockinfile Unix module. Some features are stripped like the permission stuff or the validation of the modified file.
For the backup functionality I was looking for a powershell helper function for creating backups like there is with the python method AnsibleModule#backup_local (basic.py). I currently copied the function win_lineinfile#BackupFile, which I do not like at all. Is there a central location for utility powershell functions like this?
On your 'Developing Modules' page in appendix 'Module Utilities' you list a bunch of python utilities but only one powershell utility file: powershell.ps1.
Is there anything else? Could you give me some advice here?
Anyway, I progressed quite far. Most of the implementation is done, tests as well...
Greets,
Alex