Escaping double curly braces in Ansible

前端 未结 10 1059
我寻月下人不归
我寻月下人不归 2020-12-13 05:19

How to escape double curly braces in Ansible 1.9.2?

For instance, how can I escape double curly braces in the following shell command?

- name: Test 
         


        
10条回答
  •  醉梦人生
    2020-12-13 06:04

    Here's a shorter alternative to udondan's answer; surround the whole string with double brackets:

    shell: "docker inspect --format {{ '{{ .NetworkSettings.IPAddress }}' }} instance1"
    

提交回复
热议问题