removed redundant loader

This commit is contained in:
Brian Coca 2017-07-17 09:03:39 -04:00
parent d3fcb0d1de
commit 4d55148ab2

View file

@ -229,7 +229,7 @@ class VariableManager:
all_group = self._inventory.groups.get('all') all_group = self._inventory.groups.get('all')
host_groups = sort_groups([g for g in host.get_groups() if g.name not in ['all']]) host_groups = sort_groups([g for g in host.get_groups() if g.name not in ['all']])
def _get_plugin_vars(plugin, loader, path, entities): def _get_plugin_vars(plugin, path, entities):
data = {} data = {}
try: try:
data = plugin.get_vars(self._loader, path, entities) data = plugin.get_vars(self._loader, path, entities)
@ -258,14 +258,14 @@ class VariableManager:
inventory_dir = os.path.dirname(inventory_dir) inventory_dir = os.path.dirname(inventory_dir)
for plugin in vars_loader.all(): for plugin in vars_loader.all():
data = combine_vars(data, _get_plugin_vars(plugin, self._loader, inventory_dir, entities)) data = combine_vars(data, _get_plugin_vars(plugin, inventory_dir, entities))
return data return data
def _plugins_play(entities): def _plugins_play(entities):
''' merges all entities adjacent to play ''' ''' merges all entities adjacent to play '''
data = {} data = {}
for plugin in vars_loader.all(): for plugin in vars_loader.all():
data = combine_vars(data, _get_plugin_vars(plugin, self._loader, basedir, entities)) data = combine_vars(data, _get_plugin_vars(plugin, basedir, entities))
return data return data
# configurable functions that are sortable via config # configurable functions that are sortable via config