需要帮助以查看此 include_role 有什么问题。
这项工作没有任何问题:
#US East (N. Virginia)
- hosts: localhost
gather_facts: false
connection: local
vars:
region_services:
- "us-east-1"
tasks:
- name: 3 run - should loop and print dynamic var
include_role: name=nginx
when: aws_region_name == "us-east-1"
with_items:
- "{{ region_services }}"
这通过调用任何额外的角色不起作用:
#US East (N. Virginia)
- hosts: localhost
gather_facts: false
connection: local
vars:
region_services:
- "us-east-1"
tasks:
- name: 3 run - should loop and print dynamic var
include_role: name=nginx
- name: 4 run - should loop and print dynamic var
include_role: name=nginx
when: aws_region_name == "us-east-1"
with_items:
- "{{ region_services }}"
我得到这样的错误
'item' 未定义\n\n错误似乎出现在