Hello everyone,
I am trying to change specific lines of an xml file which is located on J:\ on a windows machine.
Due to the fact that the win_xml module is only able to add but not override strings, I chose the win_linefile module to do so.
This is the task I am deploying:
- name: overwrite xml
win_lineinfile:
path: J:\settings_test.xml
regexp: '<\/url>\s*<snapshots>\s*<enabled>true<\/enabled>\s*<\/snapshots>'
line: '<othertag>\n<othertag>'
The error I get is: msg": "Get-AnsibleParam: Parameter 'path' has an invalid path 'J:\\settings_test.xml' specified."
I allready tried to use / instead of \, use single quotes and also double quotes + escaping. But nothing worked for me.
Is there anything I am missing? Thanks in advance, I appreciate any help!
Kind Regards