![]() Returns a subnet mask for a combination of IP address and subnet mask ip_netmask('10.10.10.5/24') Returns a prefix length for a combination of IP address and subnet mask ip_prefixlen('10.10.10.5/24') Returns an IP address for a combination of IP address and subnet mask ip_address('10.10.10.5/24') ![]() Included filters are the following: ip_address(addr) This package intends to provide a set of filters and handler to the Python 3 netaddr module, on a way that is hopefully easy and lightweight to use. However, probably you won’t need the entire Ansible package just to be able to use it. Jinja2 provides several integrated filters to work with, however it can be complicated to use complex data types.Īnsible provides a way to work this on its collection. Useful data for network engineers are wildcards or hostmasks, network size, class, type, and so on. There is additional information we can infer from this single item, as its network address, broadcast address. On networking and network automation, we need to extract info about IP addresses as a combination of two values:įor 10.10.10.5/24, the host address is 10.10.10.5 and the subnet mask is 255.255.255.0, and its prefix length is 24. ![]() Jinja2 filters for IP addresses, the easy way Why
0 Comments
Leave a Reply. |