Hi Team,

I have the file with the below content.

  "Bamboo": {
    "Endpoint": "http://xx.xx.xxx.xxx:800";,
    "Zookeeper": {
      "Host": "//xx.xxx.xxx.xx:2181,xx.xxx.xxx.xx:2181,xx.xxx.xxx.xx:2181",
      "Path": "/marathon-haproxy/state",
      "ReportingDelay": 5
    }
  },

I wanted to dynamically update the below line using lineinfile
    "Endpoint": "http://xx.xx.xxx.xxx:800";,

My Ansible has the below code
lineinfile: dest=/var/bamboo/production.json.bak state=present regexp="^ 
 \"Bamboo\"":" {" insertafter="  \"Bamboo\"":"\{" line="    \"Endpoint\"":" 
\"http://{{ansible_default_ipv4.address}}:8080\"; "

For some reason, it is adding the line to the EOF. 

Can someone please suggest on how can i fix it?

-- 
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/6acbe20e-4e57-4a38-a851-06d140340498%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to