Hello, did u check ur host?..
Also u can check if path is configured  correctly but putting a txt or conf
file in the same directory  as ur xml one(since i worked with txt nd conf
file only using lineinfile )and running the same task on that file.If that
works fine it means its failing on xml..some people complained  that
lineinfile somehow  changed the file format...U can try using template
module..
hope that might help.
Regards

On Wed, 20 Mar 2019, 21:19 'bit conneeect' via Ansible Project, <
[email protected]> wrote:

> 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
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/403c0fc2-bc41-4ea7-8fab-4cae33d47c48%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/403c0fc2-bc41-4ea7-8fab-4cae33d47c48%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAEaHSXaiOVeCLfuLHndtCGe6D3YW%3DtS%2BT4%3DBa1pxvW6-YP6ANA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to