Fix the order of the arguments for ansible.netcommon.reduce_on_network. Pass the network as the argument and the list of IP addresses as the filter input.
(cherry picked from commit 454ac6420e
)
Co-authored-by: Pablo Martinez <pablo@docecosas.com>
This commit is contained in:
parent
8bdda8792d
commit
633396c71b
1 changed files with 1 additions and 1 deletions
|
@ -505,7 +505,7 @@ The ``network_in_network`` filter returns whether an address or a network passed
|
||||||
|
|
||||||
To check whether multiple addresses belong to a network, use the ``reduce_on_network`` filter::
|
To check whether multiple addresses belong to a network, use the ``reduce_on_network`` filter::
|
||||||
|
|
||||||
# {{ '192.168.0.0/24' | ansible.netcommon.reduce_on_network( ['192.168.0.34', '10.3.0.3', '192.168.2.34'] ) }}
|
# {{ ['192.168.0.34', '10.3.0.3', '192.168.2.34'] | ansible.netcommon.reduce_on_network( '192.168.0.0/24' ) }}
|
||||||
['192.168.0.34']
|
['192.168.0.34']
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue