1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Adding vars back in and trying to add a little more speed by avoiding copies

This commit is contained in:
James Cammarata 2015-11-17 14:44:46 -05:00
parent 25807f5404
commit 180159b01d

View file

@ -101,13 +101,14 @@ class VariableManager:
def __getstate__(self):
data = dict(
fact_cache = self._fact_cache.copy(),
np_fact_cache = self._nonpersistent_fact_cache.copy(),
vars_cache = self._vars_cache.copy(),
extra_vars = self._extra_vars.copy(),
host_vars_files = self._host_vars_files.copy(),
group_vars_files = self._group_vars_files.copy(),
fact_cache = self._fact_cache,
np_fact_cache = self._nonpersistent_fact_cache,
vars_cache = self._vars_cache,
extra_vars = self._extra_vars,
host_vars_files = self._host_vars_files,
group_vars_files = self._group_vars_files,
omit_token = self._omit_token,
#inventory = self._inventory,
)
return data
@ -258,6 +259,8 @@ class VariableManager:
except KeyError:
pass
all_vars['vars'] = all_vars.copy()
if play:
all_vars = combine_vars(all_vars, play.get_vars())