1CDIST(1)                             cdist                            CDIST(1)
2
3
4

NAME

6       cdist - Usable Configuration Management
7

SYNOPSIS

9          cdist [-h] [-V] {banner,config,install,inventory,preos,shell,info} ...
10
11          cdist banner [-h] [-l LOGLEVEL] [-q] [-v]
12
13          cdist config [-h] [-l LOGLEVEL] [-q] [-v] [-b] [--colors WHEN]
14                       [-g CONFIG_FILE] [-4] [-6] [-C CACHE_PATH_PATTERN]
15                       [-c CONF_DIR] [-i MANIFEST] [-j [JOBS]] [--log-server]
16                       [-n] [-o OUT_PATH] [-P] [-R [{tar,tgz,tbz2,txz}]]
17                       [-r REMOTE_OUT_PATH] [--remote-copy REMOTE_COPY]
18                       [--remote-exec REMOTE_EXEC] [-S] [-I INVENTORY_DIR] [-A]
19                       [-a] [-f HOSTFILE] [-p [HOST_MAX]] [-s] [-t]
20                       [host [host ...]]
21
22          cdist install [-h] [-l LOGLEVEL] [-q] [-v] [-b] [--colors WHEN]
23                        [-g CONFIG_FILE] [-4] [-6] [-C CACHE_PATH_PATTERN]
24                        [-c CONF_DIR] [-i MANIFEST] [-j [JOBS]] [--log-server]
25                        [-n] [-o OUT_PATH] [-P] [-R [{tar,tgz,tbz2,txz}]]
26                        [-r REMOTE_OUT_PATH] [--remote-copy REMOTE_COPY]
27                        [--remote-exec REMOTE_EXEC] [-S] [-I INVENTORY_DIR] [-A]
28                        [-a] [-f HOSTFILE] [-p [HOST_MAX]] [-s] [-t]
29                        [host [host ...]]
30
31          cdist inventory [-h] {add-host,add-tag,del-host,del-tag,list} ...
32
33          cdist inventory add-host [-h] [-l LOGLEVEL] [-q] [-v] [-b] [--colors WHEN]
34                                   [-g CONFIG_FILE] [-I INVENTORY_DIR] [-f HOSTFILE]
35                                   [host [host ...]]
36
37          cdist inventory add-tag [-h] [-l LOGLEVEL] [-q] [-v] [-b] [--colors WHEN]
38                                  [-g CONFIG_FILE] [-I INVENTORY_DIR] [-f HOSTFILE]
39                                  [-T TAGFILE] [-t TAGLIST]
40                                  [host [host ...]]
41
42          cdist inventory del-host [-h] [-l LOGLEVEL] [-q] [-v] [-b] [--colors WHEN]
43                                   [-g CONFIG_FILE] [-I INVENTORY_DIR] [-a]
44                                   [-f HOSTFILE]
45                                   [host [host ...]]
46
47          cdist inventory del-tag [-h] [-l LOGLEVEL] [-q] [-v] [-b] [--colors WHEN]
48                                  [-g CONFIG_FILE] [-I INVENTORY_DIR] [-a]
49                                  [-f HOSTFILE] [-T TAGFILE] [-t TAGLIST]
50                                  [host [host ...]]
51
52          cdist inventory list [-h] [-l LOGLEVEL] [-q] [-v] [-b] [--colors WHEN]
53                               [-g CONFIG_FILE] [-I INVENTORY_DIR] [-a] [-f HOSTFILE]
54                               [-H] [-t]
55                               [host [host ...]]
56
57          cdist preos [-h] [-l LOGLEVEL] [-q] [-v] [-c CONF_DIR] [-g CONFIG_FILE] [-L]
58                      [preos] ...
59
60          cdist preos [preos-options] debian [-h] [-l LOGLEVEL] [-q] [-v] [-b] [-a ARCH] [-B]
61                                             [-C] [-c CDIST_PARAMS] [-D DRIVE] [-e REMOTE_EXEC]
62                                             [-i MANIFEST] [-k KEYFILE ] [-m MIRROR]
63                                             [-P ROOT_PASSWORD] [-p PXE_BOOT_DIR] [-r]
64                                             [-S SCRIPT] [-s SUITE] [-y REMOTE_COPY]
65                                             target_dir
66
67          cdist preos [preos-options] devuan [-h] [-l LOGLEVEL] [-q] [-v] [-b] [-a ARCH] [-B]
68                                             [-C] [-c CDIST_PARAMS] [-D DRIVE] [-e REMOTE_EXEC]
69                                             [-i MANIFEST] [-k KEYFILE ] [-m MIRROR]
70                                             [-P ROOT_PASSWORD] [-p PXE_BOOT_DIR] [-r]
71                                             [-S SCRIPT] [-s SUITE] [-y REMOTE_COPY]
72                                             target_dir
73
74          cdist preos [preos-options] ubuntu [-h] [-l LOGLEVEL] [-q] [-v] [-b] [-a ARCH] [-B]
75                                             [-C] [-c CDIST_PARAMS] [-D DRIVE] [-e REMOTE_EXEC]
76                                             [-i MANIFEST] [-k KEYFILE ] [-m MIRROR]
77                                             [-P ROOT_PASSWORD] [-p PXE_BOOT_DIR] [-r]
78                                             [-S SCRIPT] [-s SUITE] [-y REMOTE_COPY]
79                                             target_dir
80
81          cdist shell [-h] [-l LOGLEVEL] [-q] [-v] [--colors WHEN] [-s SHELL]
82
83          cdist info [-h] [-a] [-c CONF_DIR] [-e] [-F] [-f] [-g CONFIG_FILE] [-t]
84                     [pattern]
85
86          cdist scan -I INTERFACE [--m MODE] [--name-mapper PATH_TO_SCRIPT] [--list]
87                     [-d CONFIG_DELAY] [-t TRIGGER_DELAY]
88

DESCRIPTION

90       cdist is the frontend executable to the cdist configuration management.
91       It supports different subcommands as explained below.
92
93       It is written in Python so it requires python(1) to be  installed.   It
94       requires a minimal Python version 3.5.
95

GENERAL

97       All commands accept the following options:
98
99       -h, --help
100              Show the help screen.
101
102       --colors WHEN
103              Colorize  cdist's  output.  If enabled, cdist will use different
104              colors for different log levels.   WHEN  recognizes  the  values
105              'always', 'never', and 'auto' (the default).
106
107              If the value is 'auto', colored output is enabled if stdout is a
108              TTY  unless  the  NO_COLOR  (https://no-color.org/)  environment
109              variable is defined.
110
111       -l LOGLEVEL, --log-level LOGLEVEL
112              Set the specified verbosity level. The levels, in order from the
113              lowest to the highest, are: ERROR (-1), WARNING (0),  INFO  (1),
114              VERBOSE  (2), DEBUG (3), TRACE (4 or higher). If used along with
115              -v then -v increases last set value and -l overwrites  last  set
116              value.
117
118       -q, --quiet
119              Quiet mode: disables logging, including WARNING and ERROR.
120
121       -v, --verbose
122              Increase  the  verbosity  level. Every instance of -v increments
123              the verbosity level by one. Its default value  is  0  which  in‐
124              cludes  ERROR and WARNING levels.  The levels, in order from the
125              lowest to the highest, are: ERROR (-1), WARNING (0),  INFO  (1),
126              VERBOSE  (2), DEBUG (3), TRACE (4 or higher). If used along with
127              -l then -l overwrites last set value and -v increases  last  set
128              value.
129
130       -V, --version
131              Show version and exit.
132
134       Displays  the  cdist banner. Useful for printing cdist posters - a must
135       have for every office.
136

CONFIG/INSTALL

138       Configure/install one or more hosts.  Install command is  currently  in
139       beta.
140
141       -4, --force-ipv4
142              Force to use IPv4 addresses only. No influence for custom remote
143              commands.
144
145       -6, --force-ipv6
146              Force to use IPv6 addresses only. No influence for custom remote
147              commands.
148
149       -A, --all-tagged
150              Use all hosts present in tags db. Currently in beta.
151
152       -a, --all
153              List  hosts  that have all specified tags, if -t/--tag is speci‐
154              fied.
155
156       -b, --beta
157              Enable beta functionality.
158
159       -C CACHE_PATH_PATTERN, --cache-path-pattern CACHE_PATH_PATTERN
160              Specify custom cache path pattern. If it is not set then default
161              hostdir  is used. For more info on format see CACHE PATH PATTERN
162              FORMAT below.
163
164       -c CONF_DIR, --conf-dir CONF_DIR
165              Add a configuration directory. Can be specified multiple  times.
166              If  configuration directories contain conflicting types, explor‐
167              ers or manifests, then the last one found is used.
168
169       -f HOSTFILE, --file HOSTFILE
170              Read specified file for a list of additional hosts to operate on
171              or if '-' is given, read stdin (one host per line). For the file
172              format see HOSTFILE FORMAT below.
173
174       -g CONFIG_FILE, --config-file CONFIG_FILE
175              Use specified custom configuration file.
176
177       -I INVENTORY_DIR, --inventory INVENTORY_DIR
178              Use specified custom inventory directory. Inventory directory is
179              set  up  by the following rules: if cdist configuration resolves
180              this value then specified directory is used, if HOME env var  is
181              set  then  ~/.cdit/inventory is used, otherwise distribution in‐
182              ventory directory is used.
183
184       -i MANIFEST, --initial-manifest MANIFEST
185              Path to a cdist manifest or - to read from stdin.
186
187       -j [JOBS], --jobs [JOBS]
188              Operate in parallel in specified maximum number of jobs.  Global
189              explorers,  object prepare and object run are supported. Without
190              argument CPU count is used by default.
191
192       --log-server
193              Start a log server for sub processes to use. This is mainly use‐
194              ful  when  running  cdist  nested from a code- local script. Log
195              server is always implicitly started for 'install' command.
196
197       -n, --dry-run
198              Do not execute code.
199
200       -o OUT_PATH, --out-dir OUT_PATH
201              Directory to save cdist output in.
202
203       -P, --timestamp
204              Timestamp log messages with the current local date and  time  in
205              the format: YYYYMMDDHHMMSS.us.
206
207       -p [HOST_MAX], --parallel [HOST_MAX]
208              Operate  on  multiple  hosts  in  parallel for specified maximum
209              hosts at a time. Without argument CPU count is used by default.
210
211       -R [{tar,tgz,tbz2,txz}], --use-archiving [{tar,tgz,tbz2,txz}]
212              Operate by using archiving with compression  where  appropriate.
213              Supported  values are: tar - tar archive, tgz - gzip tar archive
214              (the default), tbz2 - bzip2 tar archive and txz - lzma  tar  ar‐
215              chive. Currently in beta.
216
217       -r REMOTE_OUT_PATH, --remote-out-dir REMOTE_OUT_PATH
218              Directory to save cdist output in on the target host.
219
220       -S, --disable-saving-output-streams
221              Disable saving output streams.
222
223       -s, --sequential
224              Operate on multiple hosts sequentially (default).
225
226       --remote-copy REMOTE_COPY
227              Command to use for remote copy (should behave like scp).
228
229       --remote-exec REMOTE_EXEC
230              Command to use for remote execution (should behave like ssh).
231
232       -t, --tag
233              Host  is  specified by tag, not hostname/address; list all hosts
234              that contain any of specified tags.  Currently in beta.
235
236   HOSTFILE FORMAT
237       The HOSTFILE contains one host per line.  A comment is started with '#'
238       and  continues to the end of the line.  Any leading and trailing white‐
239       space on a line is ignored.  Empty lines are ignored/skipped.
240
241       The Hostfile lines are processed as follows. First,  all  comments  are
242       removed.  Then  all  leading  and  trailing  whitespace  characters are
243       stripped.  If such a line results in empty line it is  ignored/skipped.
244       Otherwise, host string is used.
245
246   CACHE PATH PATTERN FORMAT
247       Cache  path  pattern specifies path for a cache directory subdirectory.
248       In the path, '%N' will be substituted by the target host, '%h' will  be
249       substituted  by the calculated host directory, '%P' will be substituted
250       by the current process id. All format codes that python  datetime.strf‐
251       time()  function  supports, except '%h', are supported. These date/time
252       directives format cdist config/install start time.
253
254       If empty pattern is specified then default calculated host directory is
255       used.
256
257       Calculated host directory is a hash of a host cdist operates on.
258
259       Resulting  path  is used to specify cache path subdirectory under which
260       current host cache data are saved.
261

INVENTORY

263       Manage inventory database.  Currently in beta with all sub-commands.
264

INVENTORY ADD-HOST

266       Add host(s) to inventory database.
267
268       host   Host(s) to add.
269
270       -b, --beta
271              Enable beta functionality.
272
273       -f HOSTFILE, --file HOSTFILE
274              Read additional hosts to add from specified file or  from  stdin
275              if  '-'  (each  host  on separate line).  Hostfile format is the
276              same as config hostfile format.
277
278       -g CONFIG_FILE, --config-file CONFIG_FILE
279              Use specified custom configuration file.
280
281       -I INVENTORY_DIR, --inventory INVENTORY_DIR
282              Use specified custom inventory directory. Inventory directory is
283              set  up  by the following rules: if cdist configuration resolves
284              this value then specified directory is used, if HOME env var  is
285              set  then  ~/.cdit/inventory is used, otherwise distribution in‐
286              ventory directory is used.
287

INVENTORY ADD-TAG

289       Add tag(s) to inventory database.
290
291       host   List of host(s) for which tags are added.
292
293       -b, --beta
294              Enable beta functionality.
295
296       -f HOSTFILE, --file HOSTFILE
297              Read additional hosts to add tags from specified  file  or  from
298              stdin  if  '-' (each host on separate line).  Hostfile format is
299              the same as config hostfile format.
300
301       -g CONFIG_FILE, --config-file CONFIG_FILE
302              Use specified custom configuration file.
303
304       -I INVENTORY_DIR, --inventory INVENTORY_DIR
305              Use specified custom inventory directory. Inventory directory is
306              set  up  by the following rules: if cdist configuration resolves
307              this value then specified directory is used, if HOME env var  is
308              set  then  ~/.cdit/inventory is used, otherwise distribution in‐
309              ventory directory is used.
310
311       -T TAGFILE, --tag-file TAGFILE
312              Read additional tags to add from specified file or from stdin if
313              '-'  (each tag on separate line).  Tagfile format is the same as
314              config hostfile format.
315
316       -t TAGLIST, --taglist TAGLIST
317              Tag list to be added for specified host(s), comma separated val‐
318              ues.
319

INVENTORY DEL-HOST

321       Delete host(s) from inventory database.
322
323       host   Host(s) to delete.
324
325       -a, --all
326              Delete all hosts.
327
328       -b, --beta
329              Enable beta functionality.
330
331       -f HOSTFILE, --file HOSTFILE
332              Read  additional  hosts  to  delete  from specified file or from
333              stdin if '-' (each host on separate line).  Hostfile  format  is
334              the same as config hostfile format.
335
336       -g CONFIG_FILE, --config-file CONFIG_FILE
337              Use specified custom configuration file.
338
339       -I INVENTORY_DIR, --inventory INVENTORY_DIR
340              Use specified custom inventory directory. Inventory directory is
341              set up by the following rules: if cdist  configuration  resolves
342              this  value then specified directory is used, if HOME env var is
343              set then ~/.cdit/inventory is used, otherwise  distribution  in‐
344              ventory directory is used.
345

INVENTORY DEL-TAG

347       Delete tag(s) from inventory database.
348
349       host   List of host(s) for which tags are deleted.
350
351       -a, --all
352              Delete all tags for specified host(s).
353
354       -b, --beta
355              Enable beta functionality.
356
357       -f HOSTFILE, --file HOSTFILE
358              Read  additional hosts to delete tags for from specified file or
359              from stdin if '-' (each host on separate line). Hostfile  format
360              is the same as config hostfile format.
361
362       -g CONFIG_FILE, --config-file CONFIG_FILE
363              Use specified custom configuration file.
364
365       -I INVENTORY_DIR, --inventory INVENTORY_DIR
366              Use specified custom inventory directory. Inventory directory is
367              set up by the following rules: if cdist  configuration  resolves
368              this  value then specified directory is used, if HOME env var is
369              set then ~/.cdit/inventory is used, otherwise  distribution  in‐
370              ventory directory is used.
371
372       -T TAGFILE, --tag-file TAGFILE
373              Read  additional  tags  from specified file or from stdin if '-'
374              (each tag on separate line).  Tagfile format is the same as con‐
375              fig hostfile format.
376
377       -t TAGLIST, --taglist TAGLIST
378              Tag  list  to  be deleted for specified host(s), comma separated
379              values.
380

INVENTORY LIST

382       List inventory database.
383
384       host   Host(s) to list.
385
386       -a, --all
387              List hosts that have all specified tags, if -t/--tag  is  speci‐
388              fied.
389
390       -b, --beta
391              Enable beta functionality.
392
393       -f HOSTFILE, --file HOSTFILE
394              Read  additional hosts to list from specified file or from stdin
395              if '-' (each host on separate line). If no host or host file  is
396              specified  then,  by  default,  list all. Hostfile format is the
397              same as config hostfile format.
398
399       -g CONFIG_FILE, --config-file CONFIG_FILE
400              Use specified custom configuration file.
401
402       -H, --host-only
403              Suppress tags listing.
404
405       -I INVENTORY_DIR, --inventory INVENTORY_DIR
406              Use specified custom inventory directory. Inventory directory is
407              set  up  by the following rules: if cdist configuration resolves
408              this value then specified directory is used, if HOME env var  is
409              set  then  ~/.cdit/inventory is used, otherwise distribution in‐
410              ventory directory is used.
411
412       -t, --tag
413              Host is specified by tag, not hostname/address; list  all  hosts
414              that contain any of specified tags.
415

PREOS

417       Create PreOS.
418
419       -c CONF_DIR, --conf-dir CONF_DIR
420              Add configuration directory (one that contains "preos" subdirec‐
421              tory).
422
423       -g CONFIG_FILE, --config-file CONFIG_FILE
424              Use specified custom configuration file.
425
426       -L, --list-preoses
427              List available PreOS-es.
428
429       Currently, the following PreOS-es are supported:
430
431       • debian
432
433       • ubuntu
434
435       • devuan
436

PREOS DEBIAN/DEVUAN

438       target_dir
439              target directory where PreOS will be bootstrapped
440
441       -a ARCH, --arch ARCH
442              target debootstrap architecture, by default 'amd64'
443
444       -B, --bootstrap
445              do bootstrap step
446
447       -b, --beta
448              Enable beta functionality.
449
450       -C, --configure
451              do configure step
452
453       -c CDIST_PARAMS, --cdist-params CDIST_PARAMS
454              parameters that will be passed to cdist config, by default  '-v'
455              is used
456
457       -D DRIVE, --drive-boot DRIVE
458              create bootable PreOS on specified drive
459
460       -e REMOTE_EXEC, --remote-exec REMOTE_EXEC
461              remote  exec  that  cdist  config  will use, by default internal
462              script is used
463
464       -i MANIFEST, --init-manifest MANIFEST
465              init manifest that cdist config will use,  by  default  internal
466              init manifest is used
467
468       -k KEYFILE, --keyfile KEYFILE
469              ssh  key files that will be added to cdist config; '__ssh_autho‐
470              rized_keys root ...' type is appended to initial manifest
471
472       -m MIRROR, --mirror MIRROR
473              use specified mirror for debootstrap
474
475       -P ROOT_PASSWORD, --root-password ROOT_PASSWORD
476              Set specified password for root, generated by default
477
478       -p PXE_BOOT_DIR, --pxe-boot-dir PXE_BOOT_DIR
479              PXE boot directory
480
481       -r, --rm-bootstrap-dir
482              remove target directory after finishing
483
484       -S SCRIPT, --script SCRIPT
485              use specified script for debootstrap
486
487       -s SUITE, --suite SUITE
488              suite used for debootstrap, by default 'stable'
489
490       -y REMOTE_COPY, --remote-copy REMOTE_COPY
491              remote copy that cdist config  will  use,  by  default  internal
492              script is used
493

PREOS UBUNTU

495       target_dir
496              target directory where PreOS will be bootstrapped
497
498       -a ARCH, --arch ARCH
499              target debootstrap architecture, by default 'amd64'
500
501       -B, --bootstrap
502              do bootstrap step
503
504       -b, --beta
505              Enable beta functionality.
506
507       -C, --configure
508              do configure step
509
510       -c CDIST_PARAMS, --cdist-params CDIST_PARAMS
511              parameters  that will be passed to cdist config, by default '-v'
512              is used
513
514       -D DRIVE, --drive-boot DRIVE
515              create bootable PreOS on specified drive
516
517       -e REMOTE_EXEC, --remote-exec REMOTE_EXEC
518              remote exec that cdist config  will  use,  by  default  internal
519              script is used
520
521       -i MANIFEST, --init-manifest MANIFEST
522              init  manifest  that  cdist config will use, by default internal
523              init manifest is used
524
525       -k KEYFILE, --keyfile KEYFILE
526              ssh key files that will be added to cdist config;  '__ssh_autho‐
527              rized_keys root ...' type is appended to initial manifest
528
529       -m MIRROR, --mirror MIRROR
530              use specified mirror for debootstrap
531
532       -P ROOT_PASSWORD, --root-password ROOT_PASSWORD
533              Set specified password for root, generated by default
534
535       -p PXE_BOOT_DIR, --pxe-boot-dir PXE_BOOT_DIR
536              PXE boot directory
537
538       -r, --rm-bootstrap-dir
539              remove target directory after finishing
540
541       -S SCRIPT, --script SCRIPT
542              use specified script for debootstrap
543
544       -s SUITE, --suite SUITE
545              suite used for debootstrap, by default 'xenial'
546
547       -y REMOTE_COPY, --remote-copy REMOTE_COPY
548              remote  copy  that  cdist  config  will use, by default internal
549              script is used
550

SHELL

552       This command allows you to spawn a shell that  enables  access  to  the
553       types as commands. It can be thought as an "interactive manifest" envi‐
554       ronment. See below for example usage. Its primary use is for  debugging
555       type parameters.
556
557       -s SHELL, --shell SHELL
558              Select  shell  to  use,  defaults  to  current shell. Used shell
559              should be POSIX compatible shell.
560

INFO

562       Display information for cdist (global explorers, types).
563
564       pattern
565              Glob pattern. If it contains special characters('?',  '*',  '[')
566              then  it  is  used  as  specified, otherwise it is translated to
567              *pattern*.
568
569       -h, --help
570              Show help message and exit.
571
572       -a, --all
573              Display all info. This is the default.
574
575       -c CONF_DIR, --conf-dir CONF_DIR
576              Add configuration directory (can be repeated).
577
578       -e, --global-explorers
579              Display info for global explorers.
580
581       -F, --fixed-string
582              Interpret pattern as a fixed string.
583
584       -f, --full
585              Display full details.
586
587       -g CONFIG_FILE, --config-file CONFIG_FILE
588              Use specified custom configuration file.
589
590       -t, --types
591              Display info for types.
592

SCAN

594       Runs cdist as a daemon that discover/watch  on  hosts  and  reconfigure
595       them periodically.
596
597       -I INTERFACE, --interfaces INTERFACE
598              Interface to listen on. Can be specified multiple times.
599
600       -m MODE, --mode MODE
601              Scanner  components to enable. Can be specified multiple time to
602              enable more than one component. Supported modes are: scan, trig‐
603              ger and config. Defaults to tiggger and scan.
604
605       --name-mapper PATH_TO_SCRIPT
606              Path  to  script used to resolve a remote host name from an IPv6
607              address.
608
609       --list List known hosts and exit.
610
611       -d CONFIG_DELAY, --config-delay CONFIG_DELAY
612              How long (seconds) to wait before reconfiguring after  last  try
613              (config mode only).
614
615       -t TRIGGER_DELAY, --tigger-delay TRIGGER_DELAY
616              How long (seconds) to wait between ICMPv6 echo requests (trigger
617              mode only).
618

CONFIGURATION

620       cdist obtains configuration data from the following sources in the fol‐
621       lowing order (from higher to lower precedence):
622
623          1. command-line options
624
625          2. configuration file specified at command-line
626
627          3. configuration  file  specified  in  CDIST_CONFIG_FILE environment
628             variable
629
630          4. environment variables
631
632          5. user's configuration  file  (first  one  found  of  ~/.cdist.cfg,
633             $XDG_CONFIG_HOME/cdist/cdist.cfg, in specified order)
634
635          6. system-wide configuration file (/etc/cdist.cfg).
636
637   CONFIGURATION FILE FORMAT
638       cdist  configuration  file is in the INI file format. Currently it sup‐
639       ports only [GLOBAL] section.  The possible keywords and their  meanings
640       are as follows:
641
642       archiving
643              Use  specified  archiving.  Valid values include: 'none', 'tar',
644              'tgz', 'tbz2' and 'txz'.
645
646       beta   Enable beta functionality. It  recognizes  boolean  values  from
647              'yes'/'no', 'on'/'off', 'true'/'false' and '1'/'0'.
648
649       cache_path_pattern
650              Specify cache path pattern.
651
652       colored_output
653              Colorize cdist's output. cf. the --colors option.
654
655       conf_dir
656              List  of  configuration directories separated with the character
657              conventionally used by the operating system to  separate  search
658              path  components  (as in PATH), such as ':' for POSIX or ';' for
659              Windows.  If also specified at command  line  then  values  from
660              command line are appended to this value.
661
662       init_manifest
663              Specify default initial manifest.
664
665       inventory_dir
666              Specify inventory directory.
667
668       jobs   Specify  number  of jobs for parallel processing. If -1 then the
669              default, number of CPU's in the system is used. If 0 then paral‐
670              lel  processing  in  jobs is disabled. If set to positive number
671              then specified maximum number of processes will be used.
672
673       local_shell
674              Shell command used for local execution.
675
676       out_path
677              Directory to save cdist output in.
678
679       parallel
680              Process hosts in parallel. If -1 then  the  default,  number  of
681              CPU's  in  the  system is used. If 0 then parallel processing of
682              hosts is disabled.  If set to  positive  number  then  specified
683              maximum number of processes will be used.
684
685       remote_copy
686              Command to use for remote copy (should behave like scp).
687
688       remote_exec
689              Command to use for remote execution (should behave like ssh).
690
691       remote_out_path
692              Directory to save cdist output in on the target host.
693
694       remote_shell
695              Shell command at remote host used for remote execution.
696
697       save_output_streams
698              Enable/disable  saving  output streams (enabled by default).  It
699              recognizes   boolean   values   from   'yes'/'no',   'on'/'off',
700              'true'/'false' and '1'/'0'.
701
702       timestamp
703              Timestamp  log  messages with the current local date and time in
704              the format: YYYYMMDDHHMMSS.us.
705
706       verbosity
707              Set verbosity  level.  Valid  values  are:  'ERROR',  'WARNING',
708              'INFO', 'VERBOSE', 'DEBUG', 'TRACE' and 'OFF'.
709

FILES

711       ~/.cdist
712              Your personal cdist config directory. If exists it will be auto‐
713              matically used.
714
715       ~/.cdist/cache
716              Local cache directory.
717
718       ~/.cdist/inventory
719              The home inventory directory. If ~/.cdist exists it will be used
720              as default inventory directory.
721
722       ~/.cdist/preos
723              PreOS plugins directory, if existing.
724
725       cdist/conf
726              The  distribution  configuration directory. It contains official
727              types and explorers. This path is relative to cdist installation
728              directory.
729
730       cdist/inventory
731              The  distribution inventory directory.  This path is relative to
732              cdist installation directory.
733
734       cdist/preos
735              The distribution PreOS plugins directory.
736
737       /etc/cdist.cfg
738              Global cdist configuration file, if exists.
739
740       ~/.cdist.cfg or $XDG_CONFIG_HOME/cdist/cdist.cfg
741              Local cdist configuration file, if exists.
742

NOTES

744       cdist detects if host is specified by IPv6  address.  If  so  then  re‐
745       mote_copy  command  is  executed  with  host address enclosed in square
746       brackets (see scp(1)).
747

EXAMPLES

749          # Configure ikq05.ethz.ch with debug enabled
750          % cdist config -vvv ikq05.ethz.ch
751
752          # Configure hosts in parallel and use a different configuration directory
753          % cdist config -c ~/p/cdist-nutzung \
754              -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch
755
756          # Use custom remote exec / copy commands
757          % cdist config --remote-exec /path/to/my/remote/exec \
758              --remote-copy /path/to/my/remote/copy \
759              -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch
760
761          # Configure hosts read from file loadbalancers
762          % cdist config -f loadbalancers
763
764          # Configure hosts read from file web.hosts using 16 parallel jobs
765          % cdist config -j 16 -f web.hosts
766
767          # Display banner
768          cdist banner
769
770          # Show help
771          % cdist --help
772
773          # Show Version
774          % cdist --version
775
776          # Enter a shell that has access to emulated types
777          % cdist shell
778          % __git
779          usage: __git --source SOURCE [--state STATE] [--branch BRANCH]
780                       [--group GROUP] [--owner OWNER] [--mode MODE] object_id
781
782          # Install ikq05.ethz.ch with debug enabled
783          % cdist install -vvv ikq05.ethz.ch
784
785          # List inventory content
786          % cdist inventory list -b
787
788          # List inventory for specified host localhost
789          % cdist inventory list -b localhost
790
791          # List inventory for specified tag loadbalancer
792          % cdist inventory list -b -t loadbalancer
793
794          # Add hosts to inventory
795          % cdist inventory add-host -b web1 web2 web3
796
797          # Delete hosts from file old-hosts from inventory
798          % cdist inventory del-host -b -f old-hosts
799
800          # Add tags to specified hosts
801          % cdist inventory add-tag -b -t europe,croatia,web,static web1 web2
802
803          # Add tag to all hosts in inventory
804          % cdist inventory add-tag -b -t vm
805
806          # Delete all tags from specified host
807          % cdist inventory del-tag -b -a localhost
808
809          # Delete tags read from stdin from hosts specified by file hosts
810          % cdist inventory del-tag -b -T - -f hosts
811
812          # Configure hosts from inventory with any of specified tags
813          % cdist config -b -t web dynamic
814
815          # Configure hosts from inventory with all specified tags
816          % cdist config -b -t -a web dynamic
817
818          # Configure all hosts from inventory db
819          $ cdist config -b -A
820
821          # Create default debian PreOS in debug mode
822          $ cdist preos debian /preos/preos-debian -vvvv -C \
823              -k ~/.ssh/id_rsa.pub -p /preos/pxe-debian
824
825          # Create ubuntu PreOS
826          $ cdist preos ubuntu /preos/preos-ubuntu -C \
827              -k ~/.ssh/id_rsa.pub -p /preos/pxe-ubuntu
828
829          # Create ubuntu PreOS on drive /dev/sdb
830          # and set root password to 'password'.
831          $ cdist preos ubuntu /mnt -B -C \
832              -k ~/.ssh/id_rsa.pub -D /dev/sdb \
833              -P password
834

ENVIRONMENT

836       TMPDIR, TEMP, TMP
837              Setup the base  directory  for  the  temporary  directory.   See
838              http://docs.python.org/py3k/library/tempfile.html  for  more in‐
839              formation. This is rather useful, if the standard directory used
840              does not allow executables.
841
842       CDIST_PATH
843              Colon delimited list of config directories.
844
845       CDIST_LOCAL_SHELL
846              Selects shell for local script execution, defaults to /bin/sh.
847
848       CDIST_REMOTE_SHELL
849              Selects shell for remote script execution, defaults to /bin/sh.
850
851       CDIST_OVERRIDE
852              Allow overwriting type parameters.
853
854       CDIST_ORDER_DEPENDENCY
855              Create  dependencies based on the execution order.  Note that in
856              version 6.2.0 semantic of this processing mode is finally  fixed
857              and well defined.
858
859       CDIST_REMOTE_EXEC
860              Use this command for remote execution (should behave like ssh).
861
862       CDIST_REMOTE_COPY
863              Use this command for remote copy (should behave like scp).
864
865       CDIST_INVENTORY_DIR
866              Use this directory as inventory directory.
867
868       CDIST_BETA
869              Enable beta functionality.
870
871       CDIST_CACHE_PATH_PATTERN
872              Custom cache path pattern.
873
874       CDIST_COLORED_OUTPUT
875              Colorize cdist's output. cf. the --colors option.
876
877       CDIST_CONFIG_FILE
878              Custom configuration file.
879

EXIT STATUS

881       The following exit values shall be returned:
882
883       0   Successful completion.
884
885       1   One or more host configurations failed.
886

AUTHORS

888       Originally written by Nico Schottelius <nico-cdist--@--schottelius.org>
889       and Steven Armstrong <steven-cdist--@--armstrong.cc>.
890

CAVEATS

892       When operating in parallel, either by operating in  parallel  for  each
893       host (-p/--parallel) or by parallel jobs within a host (-j/--jobs), and
894       depending on target SSH server and its configuration you may  encounter
895       connection  drops.  This is controlled with sshd MaxStartups configura‐
896       tion options.  You may also encounter session open refusal.  This  hap‐
897       pens  with  ssh multiplexing when you reach maximum number of open ses‐
898       sions permitted per network connection. In this case ssh  will  disable
899       multiplexing.   This limit is controlled with sshd MaxSessions configu‐
900       ration options. For more details refer to sshd_config(5).
901
902       When requirements for the same object are defined  in  different  mani‐
903       fests  (see  example  below), for example, in init manifest and in some
904       other type manifest and those requirements differ then  dependency  re‐
905       solver cannot detect dependencies correctly. This happens because cdist
906       cannot prepare all objects first and run all objects  afterwards.  Some
907       object  can  depend on the result of type explorer(s) and explorers are
908       executed during object run. cdist will detect such case and  display  a
909       warning message. An example of such a case:
910
911          init manifest:
912              __a a
913              require="__e/e" __b b
914              require="__f/f" __c c
915              __e e
916              __f f
917              require="__c/c" __d d
918              __g g
919              __h h
920
921          type __g manifest:
922              require="__c/c __d/d" __a a
923
924          Warning message:
925              WARNING: cdisttesthost: Object __a/a already exists with requirements:
926              /usr/home/darko/ungleich/cdist/cdist/test/config/fixtures/manifest/init-deps-resolver /tmp/tmp.cdist.test.ozagkg54/local/759547ff4356de6e3d9e08522b0d0807/data/conf/type/__g/manifest: set()
927              /tmp/tmp.cdist.test.ozagkg54/local/759547ff4356de6e3d9e08522b0d0807/data/conf/type/__g/manifest: {'__c/c', '__d/d'}
928              Dependency resolver could not handle dependencies as expected.
929

COPYING

931       Copyright  (C) 2011-2020 Nico Schottelius. Free use of this software is
932       granted under the terms of the GNU General Public License v3  or  later
933       (GPLv3+).
934
936       ungleich GmbH 2021
937
938
939
940
9417.0.0                            Jul 31, 2022                         CDIST(1)
Impressum