mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 03:00:23 -07:00
Merge pull request #11805 from amenonsen/trivial-fixmes
A series of trivial FIXMEs for devel
This commit is contained in:
commit
51de207197
2 changed files with 0 additions and 11 deletions
|
@ -151,12 +151,10 @@ class Inventory(object):
|
||||||
# management will be done in VariableManager
|
# management will be done in VariableManager
|
||||||
# get group vars from group_vars/ files and vars plugins
|
# get group vars from group_vars/ files and vars plugins
|
||||||
for group in self.groups:
|
for group in self.groups:
|
||||||
# FIXME: combine_vars
|
|
||||||
group.vars = combine_vars(group.vars, self.get_group_variables(group.name))
|
group.vars = combine_vars(group.vars, self.get_group_variables(group.name))
|
||||||
|
|
||||||
# get host vars from host_vars/ files and vars plugins
|
# get host vars from host_vars/ files and vars plugins
|
||||||
for host in self.get_hosts():
|
for host in self.get_hosts():
|
||||||
# FIXME: combine_vars
|
|
||||||
host.vars = combine_vars(host.vars, self.get_host_variables(host.name))
|
host.vars = combine_vars(host.vars, self.get_host_variables(host.name))
|
||||||
|
|
||||||
|
|
||||||
|
@ -441,11 +439,9 @@ class Inventory(object):
|
||||||
vars_results = [ plugin.get_group_vars(group, vault_password=vault_password) for plugin in self._vars_plugins if hasattr(plugin, 'get_group_vars')]
|
vars_results = [ plugin.get_group_vars(group, vault_password=vault_password) for plugin in self._vars_plugins if hasattr(plugin, 'get_group_vars')]
|
||||||
for updated in vars_results:
|
for updated in vars_results:
|
||||||
if updated is not None:
|
if updated is not None:
|
||||||
# FIXME: combine_vars
|
|
||||||
vars = combine_vars(vars, updated)
|
vars = combine_vars(vars, updated)
|
||||||
|
|
||||||
# Read group_vars/ files
|
# Read group_vars/ files
|
||||||
# FIXME: combine_vars
|
|
||||||
vars = combine_vars(vars, self.get_group_vars(group))
|
vars = combine_vars(vars, self.get_group_vars(group))
|
||||||
|
|
||||||
return vars
|
return vars
|
||||||
|
@ -475,25 +471,21 @@ class Inventory(object):
|
||||||
vars_results = [ plugin.run(host, vault_password=vault_password) for plugin in self._vars_plugins if hasattr(plugin, 'run')]
|
vars_results = [ plugin.run(host, vault_password=vault_password) for plugin in self._vars_plugins if hasattr(plugin, 'run')]
|
||||||
for updated in vars_results:
|
for updated in vars_results:
|
||||||
if updated is not None:
|
if updated is not None:
|
||||||
# FIXME: combine_vars
|
|
||||||
vars = combine_vars(vars, updated)
|
vars = combine_vars(vars, updated)
|
||||||
|
|
||||||
# plugin.get_host_vars retrieves just vars for specific host
|
# plugin.get_host_vars retrieves just vars for specific host
|
||||||
vars_results = [ plugin.get_host_vars(host, vault_password=vault_password) for plugin in self._vars_plugins if hasattr(plugin, 'get_host_vars')]
|
vars_results = [ plugin.get_host_vars(host, vault_password=vault_password) for plugin in self._vars_plugins if hasattr(plugin, 'get_host_vars')]
|
||||||
for updated in vars_results:
|
for updated in vars_results:
|
||||||
if updated is not None:
|
if updated is not None:
|
||||||
# FIXME: combine_vars
|
|
||||||
vars = combine_vars(vars, updated)
|
vars = combine_vars(vars, updated)
|
||||||
|
|
||||||
# still need to check InventoryParser per host vars
|
# still need to check InventoryParser per host vars
|
||||||
# which actually means InventoryScript per host,
|
# which actually means InventoryScript per host,
|
||||||
# which is not performant
|
# which is not performant
|
||||||
if self.parser is not None:
|
if self.parser is not None:
|
||||||
# FIXME: combine_vars
|
|
||||||
vars = combine_vars(vars, self.parser.get_host_variables(host))
|
vars = combine_vars(vars, self.parser.get_host_variables(host))
|
||||||
|
|
||||||
# Read host_vars/ files
|
# Read host_vars/ files
|
||||||
# FIXME: combine_vars
|
|
||||||
vars = combine_vars(vars, self.get_host_vars(host))
|
vars = combine_vars(vars, self.get_host_vars(host))
|
||||||
|
|
||||||
return vars
|
return vars
|
||||||
|
|
|
@ -63,9 +63,6 @@ class AnsibleJ2Vars:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def __getitem__(self, varname):
|
def __getitem__(self, varname):
|
||||||
# FIXME: are we still going to need HostVars?
|
|
||||||
#from ansible.runner import HostVars
|
|
||||||
|
|
||||||
if varname not in self._templar._available_variables:
|
if varname not in self._templar._available_variables:
|
||||||
if varname in self._locals:
|
if varname in self._locals:
|
||||||
return self._locals[varname]
|
return self._locals[varname]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue