salt.modules.match¶
The match module allows for match routines to be run and determine target specs
-
salt.modules.match.
compound
(tgt)¶ Return True if the minion matches the given compound target
CLI Example:
salt '*' match.compound 'L@cheese,foo and *'
-
salt.modules.match.
data
(tgt)¶ Return True if the minion matches the given data target
CLI Example:
salt '*' match.data 'spam:eggs'
-
salt.modules.match.
glob
(tgt)¶ Return True if the minion matches the given glob target
CLI Example:
salt '*' match.glob '*'
-
salt.modules.match.
grain
(tgt, delim=':')¶ Return True if the minion matches the given grain target. The
delim
argument can be used to specify a different delimiter.CLI Example:
salt '*' match.grain 'os:Ubuntu' salt '*' match.grain_pcre 'ipv6|2001:db8::ff00:42:8329' delim='|'
Changed in version 0.16.4:
delim
argument added
-
salt.modules.match.
grain_pcre
(tgt, delim=':')¶ Return True if the minion matches the given grain_pcre target. The
delim
argument can be used to specify a different delimiter.CLI Example:
salt '*' match.grain_pcre 'os:Fedo.*' salt '*' match.grain_pcre 'ipv6|2001:.*' delim='|'
Changed in version 0.16.4:
delim
argument added
-
salt.modules.match.
ipcidr
(tgt)¶ Return True if the minion matches the given ipcidr target
CLI Example:
salt '*' match.ipcidr '192.168.44.0/24'
-
salt.modules.match.
list_
(tgt)¶ Return True if the minion matches the given list target
CLI Example:
salt '*' match.list 'server1,server2'
-
salt.modules.match.
pcre
(tgt)¶ Return True if the minion matches the given pcre target
CLI Example:
salt '*' match.pcre '.*'
-
salt.modules.match.
pillar
(tgt, delim=':')¶ Return True if the minion matches the given pillar target. The
delim
argument can be used to specify a different delimiter.CLI Example:
salt '*' match.pillar 'cheese:foo' salt '*' match.pillar 'clone_url|https://github.com/saltstack/salt.git' delim='|'
Changed in version 0.16.4:
delim
argument added