|
|
@ -38,15 +38,12 @@ class InventoryParser(object):
|
|
|
|
with their associated hosts and variable settings.
|
|
|
|
with their associated hosts and variable settings.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
def __init__(self, loader, groups=None, filename=C.DEFAULT_HOST_LIST):
|
|
|
|
def __init__(self, loader, groups, filename=C.DEFAULT_HOST_LIST):
|
|
|
|
if groups is None:
|
|
|
|
|
|
|
|
groups = dict()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self._loader = loader
|
|
|
|
self._loader = loader
|
|
|
|
self.filename = filename
|
|
|
|
self.filename = filename
|
|
|
|
|
|
|
|
|
|
|
|
# Start with an empty host list and the default 'all' and
|
|
|
|
# Start with an empty host list and whatever groups we're passed in
|
|
|
|
# 'ungrouped' groups.
|
|
|
|
# (which should include the default 'all' and 'ungrouped' groups).
|
|
|
|
|
|
|
|
|
|
|
|
self.hosts = {}
|
|
|
|
self.hosts = {}
|
|
|
|
self.patterns = {}
|
|
|
|
self.patterns = {}
|
|
|
|