From 00231c29bab7183f92ae12c435f321366e0cbb67 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 4 Apr 2017 16:30:57 -0400 Subject: [PATCH] Revert "keep ansible_local as top level var, always present" This reverts commit 97cb2016d86523ad6efbee2c2975ca287075a2a4. It was causing issues downstream as facts seem to be merged back for subsequent tasks. Will restore if I ever figure out how to avoid that. --- lib/ansible/vars/__init__.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/ansible/vars/__init__.py b/lib/ansible/vars/__init__.py index 1c0b4997ea6..2f14849f377 100644 --- a/lib/ansible/vars/__init__.py +++ b/lib/ansible/vars/__init__.py @@ -289,17 +289,6 @@ class VariableManager: all_vars = combine_vars(all_vars, host_facts) # always return namespaced facts all_vars = combine_vars(all_vars, {'ansible_facts': host_facts}) - - # push local to top namespace, ensure we always have, even if empty - if 'ansible_local' in all_vars['ansible_facts']: - all_vars.update({'ansible_local': all_vars['ansible_facts']['ansible_local']}) - else: - all_vars.update({'ansible_local': {}}) - - # remove possible extra ansible_local from ansible_facts namespace - if 'ansible_local' in all_vars['ansible_facts']: - del all_vars['ansible_facts']['ansible_local'] - except KeyError: pass