mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Give IncludedFile more context via ansible_search_path (#50045)
* Give IncludedFile more context via ansible_search_path to template lookups. Fixes #49969 * Update units
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# https://github.com/ansible/ansible/issues/49969
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- include_role:
|
||||
name: test
|
||||
public: true
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- included_other is defined
|
||||
@@ -0,0 +1 @@
|
||||
- include_tasks: other.yml
|
||||
@@ -0,0 +1 @@
|
||||
- include_tasks: "{{ lookup('first_found', inventory_hostname ~ '.yml') }}"
|
||||
@@ -0,0 +1,2 @@
|
||||
- set_fact:
|
||||
included_other: true
|
||||
Reference in New Issue
Block a user