1
0

target-selection.rst 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. Target Selection
  2. ----------------
  3. The default matching that Salt utilizes is shell-style globbing around the
  4. minion id. See https://docs.python.org/2/library/fnmatch.html#module-fnmatch.
  5. .. option:: -E, --pcre
  6. The target expression will be interpreted as a PCRE regular expression
  7. rather than a shell glob.
  8. .. option:: -L, --list
  9. The target expression will be interpreted as a comma-delimited list;
  10. example: server1.foo.bar,server2.foo.bar,example7.quo.qux
  11. .. option:: -G, --grain
  12. The target expression matches values returned by the Salt grains system on
  13. the minions. The target expression is in the format of '<grain value>:<glob
  14. expression>'; example: 'os:Arch*'
  15. This was changed in version 0.9.8 to accept glob expressions instead of
  16. regular expression. To use regular expression matching with grains, use
  17. the --grain-pcre option.
  18. .. option:: --grain-pcre
  19. The target expression matches values returned by the Salt grains system on
  20. the minions. The target expression is in the format of '<grain value>:<
  21. regular expression>'; example: 'os:Arch.*'
  22. .. option:: -N, --nodegroup
  23. Use a predefined compound target defined in the Salt master configuration
  24. file.
  25. .. option:: -R, --range
  26. Instead of using shell globs to evaluate the target, use a range expression
  27. to identify targets. Range expressions look like %cluster.
  28. Using the Range option requires that a range server is set up and the
  29. location of the range server is referenced in the master configuration
  30. file.