diff options
author | Jordan Borean <jborean93@gmail.com> | 2020-07-24 10:48:45 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-23 19:48:45 -0500 |
commit | e9c9c02e0a8deaa8382ba6393c7a5ca09b13167d (patch) | |
tree | 16d882138887b0c9aa577618c570cf90d8416def /lib | |
parent | 6dd05dfe67bd25eff81a9500ae0f28db81c00363 (diff) | |
download | ansible-e9c9c02e0a8deaa8382ba6393c7a5ca09b13167d.tar.gz |
Do not add connection vars to the output results (#70853) (#70855)
* Do not add connection vars to the output results
* Also revert the delgated scenario JIC
* Added regression test
(cherry picked from commit 5e1a9689837d404fd9d2db3429acf499cf1a3d2b)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ansible/executor/task_executor.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py index bd44f10ec2..63b1a7b4ca 100644 --- a/lib/ansible/executor/task_executor.py +++ b/lib/ansible/executor/task_executor.py @@ -798,13 +798,8 @@ class TaskExecutor: # also now add conneciton vars results when delegating if self._task.delegate_to: result["_ansible_delegated_vars"] = {'ansible_delegated_host': self._task.delegate_to} - for k in plugin_vars + RETURN_VARS: - if k in cvars and cvars[k] is not None: - result["_ansible_delegated_vars"][k] = cvars[k] - else: - for k in plugin_vars + RETURN_VARS: - if k in cvars and cvars[k] is not None: - result[k] = cvars[k] + for k in plugin_vars: + result["_ansible_delegated_vars"][k] = cvars.get(k) # and return display.debug("attempt loop complete, returning result") |