Fix nested include with templating (#85295)

pull/85296/head
Matt Clay 6 months ago committed by GitHub
parent 45dd2c0647
commit 714f796384
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -144,7 +144,9 @@ class IncludedFile:
parent_include_dir = parent_include._role_path
else:
try:
parent_include_dir = os.path.dirname(parent_include.args.get('_raw_params'))
# FUTURE: Since the parent include path has already been resolved, it should be used here.
# Unfortunately it's not currently stored anywhere, so it must be calculated again.
parent_include_dir = os.path.dirname(templar.template(parent_include.args.get('_raw_params')))
except AnsibleError as e:
parent_include_dir = ''
display.warning(

@ -0,0 +1,3 @@
shippable/posix/group4
context/controller
gather_facts/no

@ -0,0 +1,3 @@
- include_tasks: "{{ item }}"
with_items:
- "{{ role_path }}/tests/one.yml"
Loading…
Cancel
Save