THE GAME HAS CHANGED

Introducing Infoblox Universal DDI ManagementTM

Watch the launch to discover the new era of management for critical network services. Watch Now

API & Integration, DevOps,NetOps,SecOps

Reply

Ansible looking up if IP address used

[ Edited ]
Techie
Posts: 11
1207     1

Working on a playbook to find one free IP address with nios_next_ip  and then use the same address with second octet different in a DR range.

What would be the way to do this? Dont see a similar lookup mentioned.

Re: Ansible looking up if IP address used

Techie
Posts: 11
1208     1

Didn't work out well, the next ip only allows to return up to 20 addresses.

 

Went with a regular lookup of a network and then filter on UNUSED, that returns everything which isn't used.

 

Comparing the last octet of that list with a list of the other network and doing an intersect in Ansible gets me a list of usable IPs, well the 4th octect which i can use to create the actual IPs.

Showing results for 
Search instead for 
Did you mean: 

Recommended for You