codeaffen.phpipam.is_subnet filter – Check if a subnet belongs to another
Note
This filter plugin is part of the codeaffen.phpipam collection (version 1.7.1).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install codeaffen.phpipam.
To use it in a playbook, specify: codeaffen.phpipam.is_subnet.
New in codeaffen.phpipam 1.2.0
Synopsis
First argument is a subnet second another. If the first subnet belongs to second
Input
This describes the input of the filter, the value before | codeaffen.phpipam.is_subnet.
Parameter |
Comments |
|---|---|
Subnet in cidr format which should belongs to parent |
Positional parameters
This describes positional parameters of the filter. These are the values positional1, positional2 and so on in the following
example: input | codeaffen.phpipam.is_subnet(positional1, positional2, ...)
Parameter |
Comments |
|---|---|
Subnet where input should belongs to |
Examples
192.0.2.0/25 | codeaffen.phpipam.is_subnet(192.0.2.0/24)
Return Value
Key |
Description |
|---|---|
True if children belongs to parent and false if not or both networks are the same. Returned: success |