fixes issue #8

This commit is contained in:
Kevin Carter 2014-08-28 10:59:06 -05:00
parent 6f6e75f549
commit aa01f6c0c9

View File

@ -255,17 +255,16 @@ def _append_to_host_groups(inventory, container_type, assignment, host_type,
# Copy the options dictionary for manipulation
options = _vars.copy()
for _k, _v in options.items():
limit = None
# If a limit is set use the limit string as a filter
# for the container name and see if it matches.
if 'limit_container_types' in _v:
limit = _v.pop(
if 'limit_container_types' in options:
limit = options.pop(
'limit_container_types', None
)
if limit is None or limit in container:
hdata[_keys] = {_k: _v}
hdata[_keys] = options
def _add_container_hosts(assignment, config, container_name, container_type,
@ -715,7 +714,6 @@ def main():
% (env_version, version)
)
# Load existing inventory file if found
dynamic_inventory_file = os.path.join(local_path, 'rpc_inventory.json')
if os.path.isfile(dynamic_inventory_file):