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 paths
This commit is contained in:
Matt Martz 2018-04-26 14:25:02 -05:00 committed by GitHub
parent 2f5161628a
commit 4b01b92cfe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 0 deletions

View file

@ -0,0 +1,2 @@
- debug:
msg: one

View file

@ -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'

View file

@ -0,0 +1,2 @@
- debug:
msg: two