【发布时间】:2023-04-02 06:00:01
【问题描述】:
我尝试运行这段代码
---
- hosts: my-host
- vsphere_guest:
vcenter_hostname: vcenter.mydomain.local
username: myuser
password: mypass
guest: newvm001
vmware_guest_facts: yes
但我不断收到此错误。
错误!加载 YAML 时出现语法错误。
错误似乎出现在 '/Users/Desktop/Ansible/createvms.yml':第 3 行,第 3 列, 但可能在文件中的其他位置,具体取决于确切的语法 问题。
违规行似乎是:
- hosts: my-host - vsphere_guest: ^ here
有人可以帮忙解释一下发生了什么
【问题讨论】:
标签: yaml ansible ansible-playbook