mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 11:10:21 -07:00
Adding vars back in and trying to add a little more speed by avoiding copies
This commit is contained in:
parent
25807f5404
commit
180159b01d
1 changed files with 9 additions and 6 deletions
|
@ -101,13 +101,14 @@ class VariableManager:
|
||||||
|
|
||||||
def __getstate__(self):
|
def __getstate__(self):
|
||||||
data = dict(
|
data = dict(
|
||||||
fact_cache = self._fact_cache.copy(),
|
fact_cache = self._fact_cache,
|
||||||
np_fact_cache = self._nonpersistent_fact_cache.copy(),
|
np_fact_cache = self._nonpersistent_fact_cache,
|
||||||
vars_cache = self._vars_cache.copy(),
|
vars_cache = self._vars_cache,
|
||||||
extra_vars = self._extra_vars.copy(),
|
extra_vars = self._extra_vars,
|
||||||
host_vars_files = self._host_vars_files.copy(),
|
host_vars_files = self._host_vars_files,
|
||||||
group_vars_files = self._group_vars_files.copy(),
|
group_vars_files = self._group_vars_files,
|
||||||
omit_token = self._omit_token,
|
omit_token = self._omit_token,
|
||||||
|
#inventory = self._inventory,
|
||||||
)
|
)
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
@ -258,6 +259,8 @@ class VariableManager:
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
all_vars['vars'] = all_vars.copy()
|
||||||
|
|
||||||
if play:
|
if play:
|
||||||
all_vars = combine_vars(all_vars, play.get_vars())
|
all_vars = combine_vars(all_vars, play.get_vars())
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue