I am trying to Replace a String in an xml file . but using win_lineinfile 
module only the last occurence of it is replaced
how can i replace a String in all occurences .
One Solution i found is tro run from powershell
*(Get-Content C:\Program 
Files\dd\config.xml).replace('ToReplace','replaced') | Set-Content 
C:\Program Files\dd\config.xml*

But when i try to use the same powershell from playbook 
*win_shell: (Get-Content C:\Program 
Files\dd\config.xml).replace('ToReplace','sss') | Set-Content C:\Program 
Files\dd\config.xml *

Its executing but chnages are not happening ., Any solutions please

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/97458bf6-691e-4407-ad0b-c7b962e79230%40googlegroups.com.

Reply via email to