Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/playbooks/inventory/dynamic_inventory.py b/playbooks/inventory/dynamic_inventory.py
- index 083bca4..d713cc2 100755
- --- a/playbooks/inventory/dynamic_inventory.py
- +++ b/playbooks/inventory/dynamic_inventory.py
- @@ -810,7 +810,7 @@ def _ensure_inventory_uptodate(inventory, container_skel):
- container['properties'] = value['properties']
- -def _parse_global_variables(user_cidr, inventory, user_defined_config):
- +def _parse_global_variables(inventory, user_defined_config):
- """Add any extra variables that may have been set in config.
- :param user_cidr: ``str`` IP address range in CIDR notation
- @@ -823,9 +823,6 @@ def _parse_global_variables(user_cidr, inventory, user_defined_config):
- if 'vars' not in inventory['all']:
- inventory['all']['vars'] = {}
- - # Write the users defined cidr into global variables.
- - inventory['all']['vars']['container_cidr'] = user_cidr
- -
- if 'global_overrides' in user_defined_config:
- if isinstance(user_defined_config['global_overrides'], dict):
- inventory['all']['vars'].update(
- @@ -946,15 +943,8 @@ def main():
- if not cidr_networks:
- raise SystemExit('No container CIDR specified in user config')
- - if 'container' in cidr_networks:
- - user_cidr = cidr_networks['container']
- - elif 'management' in cidr_networks:
- - user_cidr = cidr_networks['management']
- - else:
- - raise SystemExit('No container or management network specified')
- -
- # Add the container_cidr into the all global ansible group_vars
- - _parse_global_variables(user_cidr, dynamic_inventory, user_defined_config)
- + _parse_global_variables(dynamic_inventory, user_defined_config)
- # Load all of the IP addresses that we know are used and set the queue
- _set_used_ips(user_defined_config, dynamic_inventory)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement