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

DESCRIPTION

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

GENERAL

92       All commands accept the following options:
93
94       -h, --help
95              Show the help screen.
96
97       -l LOGLEVEL, --log-level LOGLEVEL
98              Set the specified verbosity level. The levels, in order from the
99              lowest to the highest, are: ERROR (-1), WARNING (0),  INFO  (1),
100              VERBOSE  (2), DEBUG (3), TRACE (4 or higher). If used along with
101              -v then -v increases last set value and -l overwrites  last  set
102              value.
103
104       -q, --quiet
105              Quiet mode: disables logging, including WARNING and ERROR.
106
107       -v, --verbose
108              Increase  the  verbosity  level. Every instance of -v increments
109              the verbosity level  by  one.  Its  default  value  is  0  which
110              includes  ERROR  and  WARNING levels.  The levels, in order from
111              the lowest to the highest, are: ERROR (-1),  WARNING  (0),  INFO
112              (1),  VERBOSE (2), DEBUG (3), TRACE (4 or higher). If used along
113              with -l then -l overwrites last set value and -v increases  last
114              set value.
115
116       -V, --version
117              Show version and exit.
118
120       Displays  the  cdist banner. Useful for printing cdist posters - a must
121       have for every office.
122

CONFIG/INSTALL

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

INVENTORY

245       Manage inventory database.  Currently in beta with all sub-commands.
246

INVENTORY ADD-HOST

248       Add host(s) to inventory database.
249
250       host   Host(s) to add.
251
252       -b, --beta
253              Enable beta functionality.
254
255       -f HOSTFILE, --file HOSTFILE
256              Read  additional  hosts to add from specified file or from stdin
257              if '-' (each host on separate line). If no host or host file  is
258              specified  then, by default, read from stdin. Hostfile format is
259              the same as config hostfile format.
260
261       -g CONFIG_FILE, --config-file CONFIG_FILE
262              Use specified custom configuration file.
263
264       -I INVENTORY_DIR, --inventory INVENTORY_DIR
265              Use specified custom inventory directory. Inventory directory is
266              set  up  by the following rules: if cdist configuration resolves
267              this value then specified directory is used, if HOME env var  is
268              set  then  ~/.cdit/inventory  is  used,  otherwise  distribution
269              inventory directory is used.
270

INVENTORY ADD-TAG

272       Add tag(s) to inventory database.
273
274       host   List of host(s) for which tags are added.
275
276       -b, --beta
277              Enable beta functionality.
278
279       -f HOSTFILE, --file HOSTFILE
280              Read additional hosts to add tags from specified  file  or  from
281              stdin  if  '-'  (each host on separate line). If no host or host
282              file is specified then, by  default,  read  from  stdin.  If  no
283              tags/tagfile nor hosts/hostfile are specified then tags are read
284              from stdin and are added to all hosts. Hostfile  format  is  the
285              same as config hostfile format.
286
287       -g CONFIG_FILE, --config-file CONFIG_FILE
288              Use specified custom configuration file.
289
290       -I INVENTORY_DIR, --inventory INVENTORY_DIR
291              Use specified custom inventory directory. Inventory directory is
292              set up by the following rules: if cdist  configuration  resolves
293              this  value then specified directory is used, if HOME env var is
294              set  then  ~/.cdit/inventory  is  used,  otherwise  distribution
295              inventory directory is used.
296
297       -T TAGFILE, --tag-file TAGFILE
298              Read additional tags to add from specified file or from stdin if
299              '-' (each tag on separate line). If no tag or tag file is speci‐
300              fied  then,  by default, read from stdin. If no tags/tagfile nor
301              hosts/hostfile are specified then tags are read from  stdin  and
302              are  added  to  all  hosts. Tagfile format is the same as config
303              hostfile format.
304
305       -t TAGLIST, --taglist TAGLIST
306              Tag list to be added for specified host(s), comma separated val‐
307              ues.
308

INVENTORY DEL-HOST

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

INVENTORY DEL-TAG

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

INVENTORY LIST

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

PREOS

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

PREOS DEBIAN/DEVUAN

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

PREOS UBUNTU

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

SHELL

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

INFO

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

CONFIGURATION

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

FILES

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

NOTES

708       cdist  detects  if  host  is  specified  by  IPv6  address.  If so then
709       remote_copy command is executed with host address  enclosed  in  square
710       brackets (see scp(1)).
711

EXAMPLES

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

ENVIRONMENT

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

EXIT STATUS

842       The following exit values shall be returned:
843
844       0   Successful completion.
845
846       1   One or more host configurations failed.
847

AUTHORS

849       Originally written by Nico Schottelius <nico-cdist--@--schottelius.org>
850       and Steven Armstrong <steven-cdist--@--armstrong.cc>.
851

CAVEATS

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

COPYING

892       Copyright (C) 2011-2019 Nico Schottelius. Free use of this software  is
893       granted  under  the terms of the GNU General Public License v3 or later
894       (GPLv3+).
895
897       ungleich GmbH 2019
898
899
900
901
9026.4.0                            Jan 04, 2020                         CDIST(1)
Impressum