mirror of https://github.com/ansible/ansible.git
Update TaskInclude _raw_params with the expanded/templated path to file (#39365)
* Update TaskInclude _raw_params with the expanded/templated path to file * Add tests to validate host vars include pathspull/36699/merge
parent
2f5161628a
commit
4b01b92cfe
@ -0,0 +1,2 @@
|
|||||||
|
- debug:
|
||||||
|
msg: one
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
- hosts: testhost:testhost2
|
||||||
|
tasks:
|
||||||
|
- set_fact:
|
||||||
|
include_me: one
|
||||||
|
when: inventory_hostname == ansible_play_hosts[0]
|
||||||
|
|
||||||
|
- set_fact:
|
||||||
|
include_me: two
|
||||||
|
when: inventory_hostname == ansible_play_hosts[1]
|
||||||
|
|
||||||
|
- debug:
|
||||||
|
var: include_me
|
||||||
|
|
||||||
|
- include_tasks: '{{ include_me }}/include_me.yml'
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
- debug:
|
||||||
|
msg: two
|
||||||
Loading…
Reference in New Issue