Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- roles:
- - role: my_role
- vars:
- role_uuid: uuud_1
- first_param: first
- - role: my_role
- vars:
- role_uuid: uuid_2
- second_param: second
- tasks:
- - include_role:
- name: my_role
- vars:
- role_uuid: uuud_1
- first_param: first
- - include_role:
- name: my_role
- vars:
- role_uuid: uuud_2
- second_param: second
- tasks:
- - include_vars: "{{ role_id }}"
- - debug: msg="{{ role_id }}.first_param [ {{ first_param|default('undefined') }} ]"
- - debug: msg="{{ role_id }}.second_param [ {{ second_param|default('undefined') }} ]"
- first_param: 'first'
- second_param: 'second'
- - hosts: localhost
- tasks:
- - include_role:
- name: my_role
- vars:
- role_id: 'id_1'
- - include_role:
- name: my_role
- vars:
- role_id: 'id_2'
- "msg": "id_1.first_param [ first ]"
- "msg": "id_1.second_param [ undefined ]"
- "msg": "id_2.first_param [ undefined ]"
- "msg": "id_2.second_param [ second ]"
Add Comment
Please, Sign In to add comment