TAB键导致"Syntax Error while loading YAML"
---
- hosts: virthost
tasks:
- name: copy virt_tools rpm
copy:
src: virt_tools-1.1.1.el5.x86_64.rpm
dest: /tmp/virt_tools-1.1.1.el5.x86_64.rpm
- name: Install virt_tools
yum:
name: /tmp/virt_tools-1.1.1.el5.x86_64.rpm
state: presentexport ANSIBLE_INVENTORY=./hosts
ansible-playbook deploy_virt_tools/deploy_virt_tools.ymlERROR! Syntax Error while loading YAML.
The error appears to have been in '/Users/huatai/tmp/ansible/deploy_virt_tools/deploy_virt_tools.yml': line 2, column 9, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- hosts: virthost
tasks:
^ here参考
Last updated