Skip to content

Instantly share code, notes, and snippets.

@nrb
Created August 7, 2015 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nrb/486f068a048641223a69 to your computer and use it in GitHub Desktop.
Save nrb/486f068a048641223a69 to your computer and use it in GitHub Desktop.
diff --git i/playbooks/inventory/dynamic_inventory.py w/playbooks/inventory/dynamic_inventory.py
index cb48e37..3723ffb 100755
--- i/playbooks/inventory/dynamic_inventory.py
+++ w/playbooks/inventory/dynamic_inventory.py
@@ -780,6 +780,11 @@ def _set_used_ips(user_defined_config, inventory):
address = host_entry.get('%s_address' % q_name)
if address:
append_if(array=USED_IPS, item=address)
+ elif not address and q_name == 'container':
+ import pdb; pdb.set_trace() # NOQA
+
+ with open('./used_ips.json', 'w') as fp:
+ fp.write(json.dumps(USED_IPS, indent=2, sort_keys=True))
def _ensure_inventory_uptodate(inventory, container_skel):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment