Refactored inventory to make it object oriented, need to make YAML format and executable script

format compatible with this still, and add some tests for INI-style groups of groups
and variables.
This commit is contained in:
Michael DeHaan 2012-05-05 16:31:03 -04:00
parent 39e791a1d3
commit 0669ce858a
6 changed files with 284 additions and 382 deletions

View file

@ -156,19 +156,6 @@ class Runner(object):
# *****************************************************
@classmethod
def parse_hosts(cls, host_list, override_hosts=None):
''' parse the host inventory file, returns (hosts, groups) '''
if override_hosts is None:
inventory = ansible.inventory.Inventory(host_list)
else:
inventory = ansible.inventory.Inventory(override_hosts)
return inventory.host_list, inventory.groups
# *****************************************************
def _return_from_module(self, conn, host, result, err, executed=None):
''' helper function to handle JSON parsing of results '''