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.version
14
15 salt -C 'G@os:Arch.* and webserv* or G@kernel:FreeBSD' [ options ]
16 test.version
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 re‐
47 leases 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 --batch-wait=BATCH_WAIT
78 Wait the specified time in seconds after each job is done before
79 freeing the slot in the batch of the next one.
80
81 --batch-safe-limit=BATCH_SAFE_LIMIT
82 Execute the salt job in batch mode if the job would have exe‐
83 cuted on at least this many minions.
84
85 --batch-safe-size=BATCH_SAFE_SIZE
86 Batch size to use for batch jobs created by --batch-safe-limit.
87
88 -a EAUTH, --auth=EAUTH
89 Pass in an external authentication medium to validate against.
90 The credentials will be prompted for. The options are auto, key‐
91 stone, ldap, and pam. Can be used with the -T option.
92
93 -T, --make-token
94 Used in conjunction with the -a option. This creates a token
95 that allows for the authenticated user to send commands without
96 needing to re-authenticate.
97
98 --return=RETURNER
99 Choose an alternative returner to call on the minion, if an al‐
100 ternative returner is used then the return will not come back to
101 the command line but will be sent to the specified return sys‐
102 tem. The options are carbon, cassandra, couchbase, couchdb,
103 elasticsearch, etcd, hipchat, local, local_cache, memcache,
104 mongo, mysql, odbc, postgres, redis, sentry, slack, sms, smtp,
105 sqlite3, syslog, and xmpp.
106
107 -d, --doc, --documentation
108 Return the documentation for the module functions available on
109 the minions
110
111 --args-separator=ARGS_SEPARATOR
112 Set the special argument used as a delimiter between command ar‐
113 guments of compound commands. This is useful when one wants to
114 pass commas as arguments to some of the commands in a compound
115 command.
116
117 Logging Options
118 Logging options which override any settings defined on the configura‐
119 tion files.
120
121 -l LOG_LEVEL, --log-level=LOG_LEVEL
122 Console logging log level. One of all, garbage, trace, debug,
123 info, warning, error, quiet. Default: warning.
124
125 --log-file=LOG_FILE
126 Log file path. Default: /var/log/salt/master.
127
128 --log-file-level=LOG_LEVEL_LOGFILE
129 Logfile logging log level. One of all, garbage, trace, debug,
130 info, warning, error, quiet. Default: warning.
131
132 Target Selection
133 The default matching that Salt utilizes is shell-style globbing around
134 the minion id. See
135 https://docs.python.org/3/library/fnmatch.html#module-fnmatch.
136
137 -E, --pcre
138 The target expression will be interpreted as a PCRE regular ex‐
139 pression rather than a shell glob.
140
141 -L, --list
142 The target expression will be interpreted as a comma-delimited
143 list; example: server1.foo.bar,server2.foo.bar,example7.quo.qux
144
145 -G, --grain
146 The target expression matches values returned by the Salt grains
147 system on the minions. The target expression is in the format of
148 '<grain value>:<glob expression>'; example: 'os:Arch*'
149
150 This was changed in version 0.9.8 to accept glob expressions in‐
151 stead of regular expression. To use regular expression matching
152 with grains, use the --grain-pcre option.
153
154 --grain-pcre
155 The target expression matches values returned by the Salt grains
156 system on the minions. The target expression is in the format of
157 '<grain value>:< regular expression>'; example: 'os:Arch.*'
158
159 -N, --nodegroup
160 Use a predefined compound target defined in the Salt master con‐
161 figuration file.
162
163 -R, --range
164 Instead of using shell globs to evaluate the target, use a range
165 expression to identify targets. Range expressions look like
166 %cluster.
167
168 Using the Range option requires that a range server is set up
169 and the location of the range server is referenced in the master
170 configuration file.
171
172 -C, --compound
173 Utilize many target definitions to make the call very granular.
174 This option takes a group of targets separated by and or or. The
175 default matcher is a glob as usual. If something other than a
176 glob is used, preface it with the letter denoting the type; ex‐
177 ample: 'webserv* and G@os:Debian or E@db*' Make sure that the
178 compound target is encapsulated in quotes.
179
180 -I, --pillar
181 Instead of using shell globs to evaluate the target, use a pil‐
182 lar value to identify targets. The syntax for the target is the
183 pillar key followed by a glob expression: "role:production*"
184
185 -S, --ipcidr
186 Match based on Subnet (CIDR notation) or IPv4 address.
187
188 Output Options
189 --out Pass in an alternative outputter to display the return of data.
190 This outputter can be any of the available outputters:
191 highstate, json, key, overstatestage, pprint, raw, txt, yaml,
192 and many others.
193
194 Some outputters are formatted only for data returned from spe‐
195 cific functions. If an outputter is used that does not support
196 the data passed into it, then Salt will fall back on the pprint
197 outputter and display the return data using the Python pprint
198 standard library module.
199
200 --out-indent OUTPUT_INDENT, --output-indent OUTPUT_INDENT
201 Print the output indented by the provided value in spaces. Nega‐
202 tive values disable indentation. Only applicable in outputters
203 that support indentation.
204
205 --out-file=OUTPUT_FILE, --output-file=OUTPUT_FILE
206 Write the output to the specified file.
207
208 --out-file-append, --output-file-append
209 Append the output to the specified file.
210
211 --no-color
212 Disable all colored output
213
214 --force-color
215 Force colored output
216
217 NOTE:
218 When using colored output the color codes are as follows:
219
220 green denotes success, red denotes failure, blue denotes
221 changes and success and yellow denotes a expected future
222 change in configuration.
223
224 --state-output=STATE_OUTPUT, --state_output=STATE_OUTPUT
225 Override the configured state_output value for minion output.
226 One of 'full', 'terse', 'mixed', 'changes' or 'filter'. Default:
227 'none'.
228
229 --state-verbose=STATE_VERBOSE, --state_verbose=STATE_VERBOSE
230 Override the configured state_verbose value for minion output.
231 Set to True or False. Default: none.
232
233 NOTE:
234 If using --out=json, you will probably want --static as well. With‐
235 out the static option, you will get a separate JSON string per min‐
236 ion which makes JSON output invalid as a whole. This is due to us‐
237 ing an iterative outputter. So if you want to feed it to a JSON
238 parser, use --static as well.
239
241 salt(7) salt-master(1) salt-minion(1)
242
244 Thomas S. Hatch <thatch45@gmail.com> and many others, please see the
245 Authors file
246
248 2023
249
250
251
252
2533006.4 Generated on October 16, 2023 at 05:24:47 PM UTC. SALT(1)