cc7bd498fa
USED_IPS being a list did not convey it's intention of limiting IP addresses to only one instance. Using the set data type does this, and removes the need for iterating over the USED_IP array from our own code. Other lists within the code that use the 'append_if' function were not changed here because the set datatype does not get written as a list in YAML, which may be undesirable. It may be completely possible to cast sets as lists on output, but this patch is largely about clarifying intent around USED_IPS so the set-to-list dump logic wasn't explored. Also, the duplicate IP tests were left in place due to the fact that the IP addresses are populated into a queue structure separately, which may still have bugs that don't belong to Python or netaddr. In the future, it may be desirable to modify the IP-handling logic to completely use netaddr's specialized classes. Change-Id: I22312321738d1f1001984d4c81f7fd24b7a1f1c8 |
||
---|---|---|
.. | ||
inventory | ||
roles/bootstrap-host | ||
ansible.cfg | ||
bootstrap-aio.yml | ||
get-ansible-role-requirements.yml | ||
test_inventory.py | ||
test-inventory.ini |