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

前端 未结 5 1921
無奈伤痛
無奈伤痛 2020-12-03 06:47

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

elasticsearch: \"http://\"+window.location.hostname+\":9200\"         


        
5条回答
  •  余生分开走
    2020-12-03 07:26

    Just keep the colon in quotes separately -

    regexp="(elasticsearch.* \"http.*)$" line="elasticsearch':' \" {{ elasticsearch_URL }}:{{ elasticsearch_port }} \" "

提交回复
热议问题