变量和引号
vars:
package_1: example-package-release13.el5.x86_64.rpm
tasks:
- name: copy {{ package_1 }}
copy:
src: {{ package_1 }}
dest: /tmp/{{ vars.package_1 }}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 }}"Last updated