I have a process that is exporting xml config from an application and the exported xml config contains the server name of the server it was exported from.
A grep contains would contain a list of these:
./config_1.xml: ns:serverNamemyservername.dom.com</ns:serverName>
./config_2.xml: ns:serverNamemyservername.dom.com</ns:serverName>
I want to make them via an ansible task:
./config_1.xml: ns:serverName{{ gold_server_conf }}</ns:serverName>
./config_2.xml: ns:serverName{{ gold_server_conf }}</ns:serverName>
Something like this?? is wrong because Ansible will just think {{ gold_server_conf }} is a variable… but i want it to treat it just as text
- name: template out the server name
shell:
sed -i ‘s/{{ ansible_hostname }}/{{ gold_server_conf }}/g’ *