ipcidr.rst 640 B

1234567891011121314151617181920212223242526272829
  1. .. _targeting-ipcidr:
  2. ==========================
  3. Subnet/IP Address Matching
  4. ==========================
  5. Minions can easily be matched based on IP address, or by subnet (using CIDR_
  6. notation).
  7. .. code-block:: bash
  8. salt -S 192.168.40.20 test.version
  9. salt -S 2001:db8::/64 test.version
  10. Ipcidr matching can also be used in compound matches
  11. .. code-block:: bash
  12. salt -C 'S@10.0.0.0/24 and G@os:Debian' test.version
  13. It is also possible to use in both pillar and state-matching
  14. .. code-block:: yaml
  15. '172.16.0.0/12':
  16. - match: ipcidr
  17. - internal
  18. .. _CIDR: http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing