Hello,

I'm trying to replace an Ip address by anoher in a file but it doesn't work 
: 

Initial file contains :

<to uri="jetty:http://W.X.Y.Z:8080/someStuff"/>

My code below doesn't work (invalid group reference) :

  - name : Change IP in file
    replace: dest=myfile.xml regexp='(.*){{master_ip}}(.*)' 
replace='\1{{ansible_default_ipv4.address}}\2'

But If i put 1 space before and after my variable, it works but have 
useless spaces.

  - name : Change IP in file
    replace: dest=myfile.xml regexp='(.*){{master_ip}}(.*)' replace='\1 
{{ansible_default_ipv4.address}} \2'

Result : <to uri="jetty:http:// R.S.T.U :8080/someStuff"/>

Some has got any clue of the trouble ?

thanks

-- 
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/559881ed-f8b6-440c-9d91-e2715d5581b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to