1SALT(1) Salt SALT(1)
2
3
4
6 salt - salt
7
9 salt '*' [ options ] sys.doc
10
11 salt -E '.*' [ options ] sys.doc cmd
12
13 salt -G 'os:Arch.*' [ options ] test.ping
14
15 salt -C 'G@os:Arch.* and webserv* or G@kernel:FreeBSD' [ options ]
16 test.ping
17
19 Salt allows for commands to be executed across a swath of remote sys‐
20 tems in parallel. This means that remote systems can be both controlled
21 and queried with ease.
22
24 --version
25 Print the version of Salt that is running.
26
27 --versions-report
28 Show program's dependencies and version number, and then exit
29
30 -h, --help
31 Show the help message and exit
32
33 -c CONFIG_DIR, --config-dir=CONFIG_dir
34 The location of the Salt configuration directory. This directory
35 contains the configuration files for Salt master and minions.
36 The default location on most systems is /etc/salt.
37
38 -t TIMEOUT, --timeout=TIMEOUT
39 The timeout in seconds to wait for replies from the Salt min‐
40 ions. The timeout number specifies how long the command line
41 client will wait to query the minions and check on running jobs.
42 Default: 5
43
44 -s, --static
45 By default as of version 0.9.8 the salt command returns data to
46 the console as it is received from minions, but previous
47 releases would return data only after all data was received. Use
48 the static option to only return the data with a hard timeout
49 and after all minions have returned. Without the static option,
50 you will get a separate JSON string per minion which makes JSON
51 output invalid as a whole.
52
53 --async
54 Instead of waiting for the job to run on minions only print the
55 job id of the started execution and complete.
56
57 --subset=SUBSET
58 Execute the routine on a random subset of the targeted minions.
59 The minions will be verified that they have the named function
60 before executing. The SUBSET argument is the count of the min‐
61 ions to target.
62
63 -v VERBOSE, --verbose
64 Turn on verbosity for the salt call, this will cause the salt
65 command to print out extra data like the job id.
66
67 --hide-timeout
68 Instead of showing the return data for all minions. This option
69 prints only the online minions which could be reached.
70
71 -b BATCH, --batch-size=BATCH
72 Instead of executing on all targeted minions at once, execute on
73 a progressive set of minions. This option takes an argument in
74 the form of an explicit number of minions to execute at once, or
75 a percentage of minions to execute on.
76
77 -a EAUTH, --auth=EAUTH
78 Pass in an external authentication medium to validate against.
79 The credentials will be prompted for. The options are auto, key‐
80 stone, ldap, and pam. Can be used with the -T option.
81
82 -T, --make-token
83 Used in conjunction with the -a option. This creates a token
84 that allows for the authenticated user to send commands without
85 needing to re-authenticate.
86
87 --return=RETURNER
88 Choose an alternative returner to call on the minion, if an
89 alternative returner is used then the return will not come back
90 to the command line but will be sent to the specified return
91 system. The options are carbon, cassandra, couchbase, couchdb,
92 elasticsearch, etcd, hipchat, local, local_cache, memcache,
93 mongo, mysql, odbc, postgres, redis, sentry, slack, sms, smtp,
94 sqlite3, syslog, and xmpp.
95
96 -d, --doc, --documentation
97 Return the documentation for the module functions available on
98 the minions
99
100 --args-separator=ARGS_SEPARATOR
101 Set the special argument used as a delimiter between command
102 arguments of compound commands. This is useful when one wants to
103 pass commas as arguments to some of the commands in a compound
104 command.
105
106 Logging Options
107 Logging options which override any settings defined on the configura‐
108 tion files.
109
110 -l LOG_LEVEL, --log-level=LOG_LEVEL
111 Console logging log level. One of all, garbage, trace, debug,
112 info, warning, error, quiet. Default: warning.
113
114 --log-file=LOG_FILE
115 Log file path. Default: /var/log/salt/master.
116
117 --log-file-level=LOG_LEVEL_LOGFILE
118 Logfile logging log level. One of all, garbage, trace, debug,
119 info, warning, error, quiet. Default: warning.
120
121 Target Selection
122 The default matching that Salt utilizes is shell-style globbing around
123 the minion id. See
124 https://docs.python.org/2/library/fnmatch.html#module-fnmatch.
125
126 -E, --pcre
127 The target expression will be interpreted as a PCRE regular
128 expression rather than a shell glob.
129
130 -L, --list
131 The target expression will be interpreted as a comma-delimited
132 list; example: server1.foo.bar,server2.foo.bar,example7.quo.qux
133
134 -G, --grain
135 The target expression matches values returned by the Salt grains
136 system on the minions. The target expression is in the format of
137 '<grain value>:<glob expression>'; example: 'os:Arch*'
138
139 This was changed in version 0.9.8 to accept glob expressions
140 instead of regular expression. To use regular expression match‐
141 ing with grains, use the --grain-pcre option.
142
143 --grain-pcre
144 The target expression matches values returned by the Salt grains
145 system on the minions. The target expression is in the format of
146 '<grain value>:< regular expression>'; example: 'os:Arch.*'
147
148 -N, --nodegroup
149 Use a predefined compound target defined in the Salt master con‐
150 figuration file.
151
152 -R, --range
153 Instead of using shell globs to evaluate the target, use a range
154 expression to identify targets. Range expressions look like
155 %cluster.
156
157 Using the Range option requires that a range server is set up
158 and the location of the range server is referenced in the master
159 configuration file.
160
161 -C, --compound
162 Utilize many target definitions to make the call very granular.
163 This option takes a group of targets separated by and or or. The
164 default matcher is a glob as usual. If something other than a
165 glob is used, preface it with the letter denoting the type;
166 example: 'webserv* and G@os:Debian or E@db*' Make sure that the
167 compound target is encapsulated in quotes.
168
169 -I, --pillar
170 Instead of using shell globs to evaluate the target, use a pil‐
171 lar value to identify targets. The syntax for the target is the
172 pillar key followed by a glob expression: "role:production*"
173
174 -S, --ipcidr
175 Match based on Subnet (CIDR notation) or IPv4 address.
176
177 Output Options
178 --out Pass in an alternative outputter to display the return of data.
179 This outputter can be any of the available outputters:
180 grains, highstate, json, key, overstatestage, pprint, raw,
181 txt, yaml
182
183 Some outputters are formatted only for data returned from spe‐
184 cific functions; for instance, the grains outputter will not
185 work for non-grains data.
186
187 If an outputter is used that does not support the data passed
188 into it, then Salt will fall back on the pprint outputter and
189 display the return data using the Python pprint standard library
190 module.
191
192 NOTE:
193 If using --out=json, you will probably want --static as well.
194 Without the static option, you will get a separate JSON
195 string per minion which makes JSON output invalid as a whole.
196 This is due to using an iterative outputter. So if you want
197 to feed it to a JSON parser, use --static as well.
198
199 --out-indent OUTPUT_INDENT, --output-indent OUTPUT_INDENT
200 Print the output indented by the provided value in spaces. Nega‐
201 tive values disable indentation. Only applicable in outputters
202 that support indentation.
203
204 --out-file=OUTPUT_FILE, --output-file=OUTPUT_FILE
205 Write the output to the specified file.
206
207 --out-file-append, --output-file-append
208 Append the output to the specified file.
209
210 --no-color
211 Disable all colored output
212
213 --force-color
214 Force colored output
215
216 NOTE:
217 When using colored output the color codes are as follows:
218
219 green denotes success, red denotes failure, blue denotes
220 changes and success and yellow denotes a expected future
221 change in configuration.
222
223 --state-output=STATE_OUTPUT, --state_output=STATE_OUTPUT
224 Override the configured state_output value for minion output.
225 One of 'full', 'terse', 'mixed', 'changes' or 'filter'. Default:
226 'none'.
227
228 --state-verbose=STATE_VERBOSE, --state_verbose=STATE_VERBOSE
229 Override the configured state_verbose value for minion output.
230 Set to True or False. Default: none.
231
233 salt(7) salt-master(1) salt-minion(1)
234
236 Thomas S. Hatch <thatch45@gmail.com> and many others, please see the
237 Authors file
238
239
240
241
2422019.2.0 Jan 08, 2019 SALT(1)