You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
553 B
30 lines
553 B
|
|
- name: Variables loaded dynamically are available everywhere in the playbook
|
|
gather_facts: no
|
|
hosts: localhost
|
|
tasks:
|
|
- include_vars: extra.yaml
|
|
roles:
|
|
- my-vars
|
|
post_tasks:
|
|
- debug:
|
|
var: extra
|
|
- debug:
|
|
var: extra_role
|
|
- assert:
|
|
that:
|
|
- extra is defined
|
|
- extra_role is defined
|
|
|
|
- name: Even in another playbook !
|
|
gather_facts: no
|
|
hosts: localhost
|
|
tasks:
|
|
- debug:
|
|
var: extra
|
|
- debug:
|
|
var: extra_role
|
|
- assert:
|
|
that:
|
|
- extra is defined
|
|
- extra_role is defined
|
|
|