mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
170cbadc54
After #22080 IPv6 CIDR matching is supported & functional, docs should('ve) reflected that since 2015.8
30 lines
631 B
ReStructuredText
30 lines
631 B
ReStructuredText
.. _targeting-ipcidr:
|
|
|
|
==========================
|
|
Subnet/IP Address Matching
|
|
==========================
|
|
|
|
Minions can easily be matched based on IP address, or by subnet (using CIDR_
|
|
notation).
|
|
|
|
.. code-block:: bash
|
|
|
|
salt -S 192.168.40.20 test.ping
|
|
salt -S 2001:db8::/64 test.ping
|
|
|
|
Ipcidr matching can also be used in compound matches
|
|
|
|
.. code-block:: bash
|
|
|
|
salt -C 'S@10.0.0.0/24 and G@os:Debian' test.ping
|
|
|
|
It is also possible to use in both pillar and state-matching
|
|
|
|
.. code-block:: yaml
|
|
|
|
'172.16.0.0/12':
|
|
- match: ipcidr
|
|
- internal
|
|
|
|
.. _CIDR: http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing
|