0
の機能をinclude_vars
とwith_first_found
と一緒にテストしています。アシスタント - 変数を動作させることができません
私の脚本は
---
- name: Load Variables from files.
include_vars: "{{ item }}"
with_first_found:
- "a.yml"
- "b.yml"
- "default.yml"
- name: another play
hosts: all
tasks:
- debug: msg="hello {{ http_port }}"
である。しかしイムがこれを実行しているとき、私はエラーを取得し、
# ansible-playbook -i inventory/plat-inventory test.yaml
ERROR! 'with_first_found' is not a valid attribute for a Play
The error appears to have been in '/root/config-3.0.98/ansible/test.yaml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
---
- name: Load Variables from files.
^here
default.yml状態:
http_port: 80
私はここで何をしないのですか?