Revert #39365, improve error messaging (#41208)

* Revert " Update TaskInclude _raw_params with the expanded/templated path to file (#39365)"

This reverts commit 4b01b92cfe.

* Improve error messaging, catch error templating parent path
This commit is contained in:
Matt Martz 2018-06-07 09:00:50 -05:00 committed by GitHub
commit c403f01971
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 28 deletions

View file

@ -1,14 +0,0 @@
- 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

@ -64,10 +64,6 @@ ANSIBLE_STRATEGY='linear' ansible-playbook test_grandparent_inheritance.yml -i .
ANSIBLE_STRATEGY='linear' ansible-playbook undefined_var/playbook.yml -i ../../inventory "$@"
ANSIBLE_STRATEGY='free' ansible-playbook undefined_var/playbook.yml -i ../../inventory "$@"
# Include path inheritance using host var for include file path
ANSIBLE_STRATEGY='linear' ansible-playbook include_path_inheritance/playbook.yml -i ../../inventory "$@"
ANSIBLE_STRATEGY='free' ansible-playbook include_path_inheritance/playbook.yml -i ../../inventory "$@"
# include_ + apply (explicit inheritance)
ANSIBLE_STRATEGY='linear' ansible-playbook apply/include_apply.yml -i ../../inventory "$@" --tags foo
set +e