mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
dataloader: check exact value of dir (#52021)
Include path in role with directory which has 'tasks' as end. For example, roles/sometasks/templates is now considered while searching path. Fixes: #42585 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
committed by
ansibot
parent
b0306f51d7
commit
142732dba9
@@ -0,0 +1,12 @@
|
||||
---
|
||||
- template:
|
||||
src: test
|
||||
dest: "{{ output_dir }}/templated_test"
|
||||
register: custom_template_result
|
||||
|
||||
- debug:
|
||||
msg: "{{ custom_template_result }}"
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- custom_template_result.changed
|
||||
@@ -0,0 +1 @@
|
||||
Sample Text
|
||||
4
test/integration/targets/template/custom_template.yml
Normal file
4
test/integration/targets/template/custom_template.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- hosts: testhost
|
||||
gather_facts: yes
|
||||
roles:
|
||||
- { role: custom_tasks }
|
||||
@@ -9,3 +9,6 @@ ansible testhost -i testhost, -m debug -a 'msg={{ hostvars["localhost"] }}' -e "
|
||||
|
||||
# Test for https://github.com/ansible/ansible/issues/27262
|
||||
ansible-playbook ansible_managed.yml -c ansible_managed.cfg -i ../../inventory -e @../../integration_config.yml -v "$@"
|
||||
|
||||
# Test for #42585
|
||||
ANSIBLE_ROLES_PATH=../ ansible-playbook custom_template.yml -i ../../inventory -e @../../integration_config.yml -v "$@"
|
||||
|
||||
Reference in New Issue
Block a user