Introducing SOC Insights for BloxOne Threat Defense: Boost your SOC efficiency with AI-driven insights to eliminate manual work and accelerate investigation and response times. Read the blog announcement here.

API & Integration, DevOps,NetOps,SecOps

Reply

Ansible looking up if IP address used

[ Edited ]
Techie
Posts: 11
586     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
587     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