1
我正在使用Ansile 2.0.1.0。
在變量使用變量時出現語法錯誤
在我main.yml
我有這樣的任務:
- name: hoge
hosts: hoge2
connection: docker
become: yes
become_user: {{ansible_user}}
在執行我收到此錯誤信息:
ERROR! Syntax Error while loading YAML.
The error appears to have been in '/Users/fuga/Docker/ansible/main.yml': line 16, column 17, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
become: yes
become_user: {{ansible_user}}
^here
我如何修正這個錯誤?
問題可以解決,對你有利。謝謝你udondan! – user3387068