0
我需要在我的Ansible剧本如下:Ansible&with_items命名
with_items: "{{ ab36-1E }}"
以上不能正常工作,导致一个错误的Ansible 2.1和2.2版本。
{"failed": true, "msg": "template error while templating string: unexpected char u'E' at 8. String: {{ab36-1E}}"}
然而,这种工作原理:with_items: "{{ ab361E }}"
{{ab36-1E}}
在剧本在YAML文件中定义和参照的变量字典。
我想知道是否有方法使用{{ ab36-1E }}
而不是{{ ab361E }}
在Ansible的with_items
。
什么是'ab36-1E'? Ansible中没有一个有效的变量你想要做什么? – helloV
请记住,在{{}}之内,你基本上是在写忍者。随着项目会期望一个清单。你似乎在给它一个字符串,但不会引用它,所以忍者无法解析。 –
更新了我的问题。 – Vijay