mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Don't pollute include_variables (#54687)
* Don't pollute include_variables. Fixes #51667. Fixes #54618. * Rename include_variables to include_args, so we can make the distinction about what they are * Track args and vars separately * oops * oops again * linting fix * Add test
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
- assert:
|
||||
that:
|
||||
- name == 'name_from_loop_var'
|
||||
- name != 'loop_name_assert'
|
||||
@@ -94,3 +94,6 @@ test "$(egrep -c 'include handler task|ERROR! The requested handler '"'"'do_impo
|
||||
# https://github.com/ansible/ansible/issues/49969
|
||||
ansible-playbook -v parent_templating/playbook.yml 2>&1 | tee test_parent_templating.out
|
||||
test "$(egrep -c 'Templating the path of the parent include_tasks failed.' test_parent_templating.out)" = 0
|
||||
|
||||
# https://github.com/ansible/ansible/issues/54618
|
||||
ansible-playbook test_loop_var_bleed.yaml "$@"
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- include_role:
|
||||
name: loop_name_assert
|
||||
loop:
|
||||
- name_from_loop_var
|
||||
loop_control:
|
||||
loop_var: name
|
||||
Reference in New Issue
Block a user