Debian Codegraph @

doc/txt/clush.conf.txt

raw
1 ============
2 clush.conf
3 ============
4
5 ------------------------------
6 Configuration file for `clush`
7 ------------------------------
8
9 :Author: Stephane Thiell
10 :Date: 2026-07-16
11 :Copyright: GNU Lesser General Public License version 2.1 or later (LGPLv2.1+)
12 :Version: 1.10.1
13 :Manual section: 5
14 :Manual group: ClusterShell User Manual
15
16
17 DESCRIPTION
18 ===========
19
20 ``clush``\(1) configuration files are in Python's ConfigParser format.
21
22 Locations
23 ---------
24
25 ``clush``\(1) obtains configuration options from the following sources, in
26 decreasing order of precedence:
27
28 1. command-line options
29 2. *$CLUSTERSHELL_CFGDIR/clush.conf* (only used when $CLUSTERSHELL_CFGDIR
30 is defined)
31 3. user configuration file (*$XDG_CONFIG_HOME/clustershell/clush.conf*,
32 defaults to *$HOME/.config/clustershell/clush.conf*)
33 4. Python virtual environment (*{sys.prefix}/etc/clustershell/clush.conf*)
34 5. local pip user installation (*$HOME/.local/etc/clustershell/clush.conf*)
35 6. system-wide configuration file (*/etc/clustershell/clush.conf*)
36
37 For each parameter, the first obtained value will be used.
38
39 The configuration file has a format in the style of RFC 822 composed
40 of one main section:
41
42 Main
43 Program options definition
44
45
46 [Main]
47 ------
48 Configuration parameters of the ``Main`` section are described below.
49
50 fanout
51 Size of the sliding window (fanout) of active commands for ``clush``. This
52 `fanout` is used to avoid too many concurrent connections and to conserve
53 resources on the initiating hosts. In tree mode, the same `fanout` value is
54 used on the head node and on each gateway (the `fanout` value is propagated).
55 That is, if the `fanout` is **16** on the head node, each gateway will
56 initiate up to **16** connections to their target nodes at the same time.
57 confdir
58 Optional list of directory paths where clush should look for `.conf` files
59 which define run modes that can then be activated with ``--mode``. All other
60 clush config file settings defined here might be overridden in a run mode.
61 Each mode section should have a name prefixed by "mode:" to clearly identify
62 a section defining a mode. Duplicate modes are not allowed in those files.
63 Configuration files that are not readable by the current user are ignored.
64 The variable `$CFGDIR` is replaced by the path of the highest priority
65 configuration directory found (where clush.conf resides). The default confdir
66 value enables both system-wide and any installed user configuration (thanks
67 to `$CFGDIR`). Duplicate directory paths are ignored.
68 connect_timeout
69 Timeout in seconds to allow a connection to establish. This parameter is
70 passed to ssh. If set to *0*, no timeout occurs.
71 command_prefix
72 Command prefix. Generally used for specific run modes, for example to
73 implement ``sudo``\(8) support.
74 command_timeout
75 Timeout in seconds to allow a command to complete since the connection has
76 been established. This parameter is passed to ssh. In addition, the
77 ClusterShell library ensures that any commands complete in less than
78 ( connect_timeout + command_timeout ). If set to *0*, no timeout occurs.
79 color
80 ``clush`` can use NO_COLOR, CLICOLOR and CLICOLOR_FORCE
81 environment variables. NO_COLOR takes precedence over CLICOLOR_FORCE which
82 takes precedence over CLICOLOR. When the option is set in configuration file
83 environment variables are taken into account only with `auto` argument.
84 ``color`` tells whether to use ANSI colors to surround node or nodeset
85 prefix/header with escape sequences to display them in color on the terminal.
86 Valid arguments are ``never``, ``always`` or ``auto`` (which uses color if
87 standard output/error refer to a terminal). Colors are set to [34m (blue
88 foreground text) for stdout and [31m (red foreground text) for stderr, and
89 cannot be modified.
90 fd_max
91 Maximum number of open file descriptors permitted per clush process (soft
92 resource limit for open files). This limit can never exceed the system
93 (hard) limit. The `fd_max` (soft) and system (hard) limits should be high
94 enough to run ``clush``, although their values depend on your `fanout` value.
95 history_size
96 Set the maximum number of history entries saved in the GNU readline history
97 list. Negative values imply unlimited history file size.
98 node_count
99 Should ``clush`` display additional (node count) information in buffer
100 header? (`yes`/`no`)
101 maxrc
102 Should ``clush`` return the largest of command return codes? (yes/no)
103 password_prompt
104 Enable password prompt and password forwarding to stdin? (yes/no) Generally
105 used for specific run modes, for example to implement interactive
106 ``sudo``\(8) support.
107 verbosity
108 Set the verbosity level: `0` (quiet), `1` (default), `2` (verbose) or more
109 (debug).
110 ssh_user
111 Set the ssh user to use for remote connection (default is to not specify).
112 ssh_path
113 Set the ssh binary path to use for remote connection (default is `ssh`).
114 ssh_options
115 Set additional options to pass to the underlying ssh command.
116 scp_path
117 Set the scp binary path to use for remote copy (default is `scp`).
118 scp_options
119 Set additional options to pass to the underlying scp command. If not
120 specified, ssh_options are used instead.
121 rsh_path
122 Set the rsh binary path to use for remote connection (default is
123 `rsh`). You could easily use mrsh or krsh by simply changing this value.
124 rcp_path
125 Same as rsh_path for rcp command. (Default is `rcp`)
126 rsh_options
127 Set additional options to pass to the underlying rsh/rcp command.
128
129 Run modes
130 ---------
131 Since version 1.9, clush has support for run modes, which are special
132 ``clush.conf``\(5) settings with a given name. Two run modes are provided in
133 example configuration files that can be copied and modified. They implement
134 password-based authentication with ``sshpass``\(1) and support of interactive
135 ``sudo``\(8) with password.
136
137 To use a run mode with ``clush --mode``, install a configuration file in one of
138 ``clush.conf``\(5)'s `confdir` (usually ``clush.conf.d``). Only configuration
139 files ending in `.conf` are scanned. If the user running ``clush``\(1) doesn't
140 have read access to a configuration file, it is ignored. When ``--mode`` is
141 specified, you can display all available run modes for the current user by
142 enabling debug mode (``-d``).
143
144 EXAMPLES
145 ===========
146
147 Simple configuration file.
148
149 *clush.conf*
150 ------------
151
152 | [Main]
153 | fanout: 128
154 | connect_timeout: 15
155 | command_timeout: 0
156 | history_size: 100
157 | color: auto
158 | fd_max: 10240
159 | maxrc: no
160 | node_count: yes
161 | confdir: /etc/clustershell/clush.conf.d
162 |
163
164
165 FILES
166 =====
167
168 *$CLUSTERSHELL_CFGDIR/clush.conf*
169 Global clush configuration file. If $CLUSTERSHELL_CFGDIR is not defined,
170 */etc/clustershell/clush.conf* is used instead.
171
172 *$XDG_CONFIG_HOME/clustershell/clush.conf*
173 User configuration file for clush. If $XDG_CONFIG_HOME is not defined,
174 *$HOME/.config/clustershell/clush.conf* is used instead.
175
176 *{sys.prefix}/etc/clustershell/clush.conf*
177 Configuration file when ClusterShell is installed in a Python virtual
178 environment.
179
180 *$HOME/.local/etc/clustershell/clush.conf*
181 Local user configuration file for clush (default installation for pip --user)
182
183 *~/.clush.conf*
184 Deprecated per-user clush configuration file (no longer read since
185 version 1.9).
186
187
188 HISTORY
189 =======
190
191 As of ClusterShell version 1.3, the ``External`` section has been removed
192 from *clush.conf*. External commands whose outputs were used by ``clush``
193 (-a, -g, -X) are now handled by the library itself and defined in
194 ``groups.conf``\(5).
195
196
197 SEE ALSO
198 ========
199
200 ``clush``\(1), ``groups.conf``\(5), ``sshpass``\(1), ``sudo``\(8).
201
202 https://clustershell.readthedocs.io/
203
204 Python ConfigParser
205
206 https://docs.python.org/3/library/configparser.html