ERROR: Syntax Error while loading YAML script, kvm-vcpu-tool.yaml
---
Note: The error may actually appear before this position: line 10, column 13
copy:
src: {{ package_1 }}
^
We could be wrong, but this one looks like it might be an issue with
missing quotes. Always quote template expression brackets when they
start a value. For instance:
with_items:
- {{ foo }}
Should be written as:
with_items:
- "{{ foo }}"
这个name中不能是哟个变量的问题比较奇怪,参考 : inventory变量是主机相关的,不是全局变量,所以在ansible中,不能在name中使用变量。(The variable you are using is in inventory scope, so it can't be substituted.)