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

DESCRIPTION

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

GENERAL

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

CONFIG/INSTALL

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

INVENTORY

260       Manage inventory database.  Currently in beta with all sub-commands.
261

INVENTORY ADD-HOST

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

INVENTORY ADD-TAG

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

INVENTORY DEL-HOST

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

INVENTORY DEL-TAG

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

INVENTORY LIST

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

PREOS

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

PREOS DEBIAN/DEVUAN

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

PREOS UBUNTU

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

SHELL

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

INFO

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

CONFIGURATION

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

FILES

682       ~/.cdist
683              Your personal cdist config directory. If exists it will be auto‐
684              matically used.
685
686       ~/.cdist/cache
687              Local cache directory.
688
689       ~/.cdist/inventory
690              The home inventory directory. If ~/.cdist exists it will be used
691              as default inventory directory.
692
693       ~/.cdist/preos
694              PreOS plugins directory, if existing.
695
696       cdist/conf
697              The  distribution  configuration directory. It contains official
698              types and explorers. This path is relative to cdist installation
699              directory.
700
701       cdist/inventory
702              The  distribution inventory directory.  This path is relative to
703              cdist installation directory.
704
705       cdist/preos
706              The distribution PreOS plugins directory.
707
708       /etc/cdist.cfg
709              Global cdist configuration file, if exists.
710
711       ~/.cdist.cfg or $XDG_CONFIG_HOME/cdist/cdist.cfg
712              Local cdist configuration file, if exists.
713

NOTES

715       cdist detects if  host  is  specified  by  IPv6  address.  If  so  then
716       remote_copy  command  is  executed with host address enclosed in square
717       brackets (see scp(1)).
718

EXAMPLES

720          # Configure ikq05.ethz.ch with debug enabled
721          % cdist config -vvv ikq05.ethz.ch
722
723          # Configure hosts in parallel and use a different configuration directory
724          % cdist config -c ~/p/cdist-nutzung \
725              -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch
726
727          # Use custom remote exec / copy commands
728          % cdist config --remote-exec /path/to/my/remote/exec \
729              --remote-copy /path/to/my/remote/copy \
730              -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch
731
732          # Configure hosts read from file loadbalancers
733          % cdist config -f loadbalancers
734
735          # Configure hosts read from file web.hosts using 16 parallel jobs
736          % cdist config -j 16 -f web.hosts
737
738          # Display banner
739          cdist banner
740
741          # Show help
742          % cdist --help
743
744          # Show Version
745          % cdist --version
746
747          # Enter a shell that has access to emulated types
748          % cdist shell
749          % __git
750          usage: __git --source SOURCE [--state STATE] [--branch BRANCH]
751                       [--group GROUP] [--owner OWNER] [--mode MODE] object_id
752
753          # Install ikq05.ethz.ch with debug enabled
754          % cdist install -vvv ikq05.ethz.ch
755
756          # List inventory content
757          % cdist inventory list -b
758
759          # List inventory for specified host localhost
760          % cdist inventory list -b localhost
761
762          # List inventory for specified tag loadbalancer
763          % cdist inventory list -b -t loadbalancer
764
765          # Add hosts to inventory
766          % cdist inventory add-host -b web1 web2 web3
767
768          # Delete hosts from file old-hosts from inventory
769          % cdist inventory del-host -b -f old-hosts
770
771          # Add tags to specified hosts
772          % cdist inventory add-tag -b -t europe,croatia,web,static web1 web2
773
774          # Add tag to all hosts in inventory
775          % cdist inventory add-tag -b -t vm
776
777          # Delete all tags from specified host
778          % cdist inventory del-tag -b -a localhost
779
780          # Delete tags read from stdin from hosts specified by file hosts
781          % cdist inventory del-tag -b -T - -f hosts
782
783          # Configure hosts from inventory with any of specified tags
784          % cdist config -b -t web dynamic
785
786          # Configure hosts from inventory with all specified tags
787          % cdist config -b -t -a web dynamic
788
789          # Configure all hosts from inventory db
790          $ cdist config -b -A
791
792          # Create default debian PreOS in debug mode
793          $ cdist preos debian /preos/preos-debian -vvvv -C \
794              -k ~/.ssh/id_rsa.pub -p /preos/pxe-debian
795
796          # Create ubuntu PreOS
797          $ cdist preos ubuntu /preos/preos-ubuntu -C \
798              -k ~/.ssh/id_rsa.pub -p /preos/pxe-ubuntu
799
800          # Create ubuntu PreOS on drive /dev/sdb
801          # and set root password to 'password'.
802          $ cdist preos ubuntu /mnt -B -C \
803              -k ~/.ssh/id_rsa.pub -D /dev/sdb \
804              -P password
805

ENVIRONMENT

807       TMPDIR, TEMP, TMP
808              Setup the base  directory  for  the  temporary  directory.   See
809              http://docs.python.org/py3k/library/tempfile.html    for    more
810              information. This is rather useful, if  the  standard  directory
811              used does not allow executables.
812
813       CDIST_PATH
814              Colon delimited list of config directories.
815
816       CDIST_LOCAL_SHELL
817              Selects shell for local script execution, defaults to /bin/sh.
818
819       CDIST_REMOTE_SHELL
820              Selects shell for remote script execution, defaults to /bin/sh.
821
822       CDIST_OVERRIDE
823              Allow overwriting type parameters.
824
825       CDIST_ORDER_DEPENDENCY
826              Create  dependencies based on the execution order.  Note that in
827              version 6.2.0 semantic of this processing mode is finally  fixed
828              and well defined.
829
830       CDIST_REMOTE_EXEC
831              Use this command for remote execution (should behave like ssh).
832
833       CDIST_REMOTE_COPY
834              Use this command for remote copy (should behave like scp).
835
836       CDIST_INVENTORY_DIR
837              Use this directory as inventory directory.
838
839       CDIST_BETA
840              Enable beta functionality.
841
842       CDIST_CACHE_PATH_PATTERN
843              Custom cache path pattern.
844
845       CDIST_COLORED_OUTPUT
846              Colorize cdist's output. cf. the --colors option.
847
848       CDIST_CONFIG_FILE
849              Custom configuration file.
850

EXIT STATUS

852       The following exit values shall be returned:
853
854       0   Successful completion.
855
856       1   One or more host configurations failed.
857

AUTHORS

859       Originally written by Nico Schottelius <nico-cdist--@--schottelius.org>
860       and Steven Armstrong <steven-cdist--@--armstrong.cc>.
861

CAVEATS

863       When operating in parallel, either by operating in  parallel  for  each
864       host (-p/--parallel) or by parallel jobs within a host (-j/--jobs), and
865       depending on target SSH server and its configuration you may  encounter
866       connection  drops.  This is controlled with sshd MaxStartups configura‐
867       tion options.  You may also encounter session open refusal.  This  hap‐
868       pens  with  ssh multiplexing when you reach maximum number of open ses‐
869       sions permitted per network connection. In this case ssh  will  disable
870       multiplexing.   This limit is controlled with sshd MaxSessions configu‐
871       ration options. For more details refer to sshd_config(5).
872
873       When requirements for the same object are defined  in  different  mani‐
874       fests  (see  example  below), for example, in init manifest and in some
875       other type manifest  and  those  requirements  differ  then  dependency
876       resolver  cannot  detect  dependencies  correctly. This happens because
877       cdist cannot prepare all objects first and run all objects  afterwards.
878       Some  object can depend on the result of type explorer(s) and explorers
879       are executed during object run. cdist will detect such case and display
880       a warning message. An example of such a case:
881
882          init manifest:
883              __a a
884              require="__e/e" __b b
885              require="__f/f" __c c
886              __e e
887              __f f
888              require="__c/c" __d d
889              __g g
890              __h h
891
892          type __g manifest:
893              require="__c/c __d/d" __a a
894
895          Warning message:
896              WARNING: cdisttesthost: Object __a/a already exists with requirements:
897              /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()
898              /tmp/tmp.cdist.test.ozagkg54/local/759547ff4356de6e3d9e08522b0d0807/data/conf/type/__g/manifest: {'__c/c', '__d/d'}
899              Dependency resolver could not handle dependencies as expected.
900

COPYING

902       Copyright  (C) 2011-2020 Nico Schottelius. Free use of this software is
903       granted under the terms of the GNU General Public License v3  or  later
904       (GPLv3+).
905
907       ungleich GmbH 2020
908
909
910
911
9126.9.4                            Dec 21, 2020                         CDIST(1)
Impressum