Ansible playbook抛出语法错误,但一切看起来都正确。 这个角色有什么问题?
错误:
The error appears to have been in '/home/Desktop/playbooks/xx.yml': line 6, column 7, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
roles:
- role: chronos_task
^ here
CODE
---
- hosts: localhost
connection: local
gather_facts: no
roles:
- role: chronos_task
no_log: true
chronos_url: 'http://{{ chronos_host }}:{{ chronos_port }}'
chronos_tasks:
- type: iso8601
答案 0 :(得分:2)
角色可能出现什么问题?
问题可能,chronos_task
角色不在角色的路径中。
这是您在这种情况下得到的确切错误消息。