parent
5a7f579d86
commit
1010363c0b
2 changed files with 16 additions and 1 deletions
|
@ -423,7 +423,7 @@ class TaskExecutor:
|
||||||
|
|
||||||
for plugin_type, plugin_name in iteritems(clear_plugins):
|
for plugin_type, plugin_name in iteritems(clear_plugins):
|
||||||
for var in C.config.get_plugin_vars(plugin_type, plugin_name):
|
for var in C.config.get_plugin_vars(plugin_type, plugin_name):
|
||||||
if var in task_vars:
|
if var in task_vars and var not in self._job_vars:
|
||||||
del task_vars[var]
|
del task_vars[var]
|
||||||
|
|
||||||
self._task.no_log = no_log
|
self._task.no_log = no_log
|
||||||
|
|
|
@ -344,3 +344,18 @@
|
||||||
loop_var: "{{ loop_var_name }}"
|
loop_var: "{{ loop_var_name }}"
|
||||||
vars:
|
vars:
|
||||||
loop_var_name: templated_loop_var_name
|
loop_var_name: templated_loop_var_name
|
||||||
|
|
||||||
|
# https://github.com/ansible/ansible/issues/59414
|
||||||
|
- name: Test preserving original connection related vars
|
||||||
|
debug:
|
||||||
|
var: ansible_remote_tmp
|
||||||
|
vars:
|
||||||
|
ansible_remote_tmp: /tmp/test1
|
||||||
|
with_items:
|
||||||
|
- 1
|
||||||
|
- 2
|
||||||
|
register: loop_out
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
|
- loop_out['results'][1]['ansible_remote_tmp'] == '/tmp/test1'
|
||||||
|
|
Loading…
Reference in a new issue