Skip to content

Get IP for Network Device

Go to Automation

View in GitLab

Description

Automatically assigns an IP address to a network device by querying Infoblox IPAM. If the target FQDN already exists in DNS, it uses the existing IP. If the host doesn't exist, it allocates the next available IP from the specified VLAN subnet. The playbook validates that the IP is in the correct VLAN and creates a new IPv4 host record if needed. Additionally, it exports network configuration details (gateway, netmask, CIDR, vSphere network, and Palo Alto zone information) as Ansible facts for downstream provisioning tasks.

Credentials

  • Infoblox API User (infoblox_host, infoblox_username, infoblox_password)

Input

Variable Description
target FQDN of the network device (must contain a dot)
vlan VLAN number for IP allocation

Output

Variable Description
ip_adres Assigned IP address
ip_gateway Default gateway for the subnet
ip_mask Subnet netmask
ip_cidr CIDR notation of the subnet
vsphere_network vSphere distributed switch port group name
panos_vlangroup Palo Alto Networks VLAN group name
panos_zone_tag Palo Alto Networks zone tag

Dependencies