How can escape colon in a string within an Ansible YAML file?


I want to change one line of my code in file /var/www/kibana/config.js during installation from


Here I tried to use lineinfile to do that as show below

I have set variables of {{elasticsearch_URL}} and {{elasticsearch_port}} to and 9200, respectively.

Here is the error message I met:


you need to enclose the entire line in ", where : appears.

Leave a Reply