我正在使用Ansible 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 maybe elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
become: yes
become_user: {{ansible_user}}
^ here
如何解决错误?
答案 0 :(得分:2)