Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. diff --git a/playbooks/inventory/dynamic_inventory.py b/playbooks/inventory/dynamic_inventory.py
  2. index 083bca4..d713cc2 100755
  3. --- a/playbooks/inventory/dynamic_inventory.py
  4. +++ b/playbooks/inventory/dynamic_inventory.py
  5. @@ -810,7 +810,7 @@ def _ensure_inventory_uptodate(inventory, container_skel):
  6. container['properties'] = value['properties']
  7.  
  8.  
  9. -def _parse_global_variables(user_cidr, inventory, user_defined_config):
  10. +def _parse_global_variables(inventory, user_defined_config):
  11. """Add any extra variables that may have been set in config.
  12.  
  13. :param user_cidr: ``str`` IP address range in CIDR notation
  14. @@ -823,9 +823,6 @@ def _parse_global_variables(user_cidr, inventory, user_defined_config):
  15. if 'vars' not in inventory['all']:
  16. inventory['all']['vars'] = {}
  17.  
  18. - # Write the users defined cidr into global variables.
  19. - inventory['all']['vars']['container_cidr'] = user_cidr
  20. -
  21. if 'global_overrides' in user_defined_config:
  22. if isinstance(user_defined_config['global_overrides'], dict):
  23. inventory['all']['vars'].update(
  24. @@ -946,15 +943,8 @@ def main():
  25. if not cidr_networks:
  26. raise SystemExit('No container CIDR specified in user config')
  27.  
  28. - if 'container' in cidr_networks:
  29. - user_cidr = cidr_networks['container']
  30. - elif 'management' in cidr_networks:
  31. - user_cidr = cidr_networks['management']
  32. - else:
  33. - raise SystemExit('No container or management network specified')
  34. -
  35. # Add the container_cidr into the all global ansible group_vars
  36. - _parse_global_variables(user_cidr, dynamic_inventory, user_defined_config)
  37. + _parse_global_variables(dynamic_inventory, user_defined_config)
  38.  
  39. # Load all of the IP addresses that we know are used and set the queue
  40. _set_used_ips(user_defined_config, dynamic_inventory)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement