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} ...
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

DESCRIPTION

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

GENERAL

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

CONFIG/INSTALL

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

INVENTORY

243       Manage inventory database.  Currently in beta with all sub-commands.
244

INVENTORY ADD-HOST

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

INVENTORY ADD-TAG

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

INVENTORY DEL-HOST

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

INVENTORY DEL-TAG

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

INVENTORY LIST

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

PREOS

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

PREOS DEBIAN/DEVUAN

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

PREOS UBUNTU

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

SHELL

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

CONFIGURATION

553       cdist obtains configuration data from the following sources in the fol‐
554       lowing order (from higher to lower precedence):
555
556          1. command-line options
557
558          2. configuration file specified at command-line
559
560          3. configuration file  specified  in  CDIST_CONFIG_FILE  environment
561             variable
562
563          4. environment variables
564
565          5. user's  configuration  file  (first  one  found  of ~/.cdist.cfg,
566             $XDG_CONFIG_HOME/cdist/cdist.cfg, in specified order)
567
568          6. system-wide configuration file (/etc/cdist.cfg).
569
570   CONFIGURATION FILE FORMAT
571       cdist configuration file is in the INI file format. Currently  it  sup‐
572       ports  only [GLOBAL] section.  The possible keywords and their meanings
573       are as follows:
574
575       archiving
576              Use specified archiving. Valid values  include:  'none',  'tar',
577              'tgz', 'tbz2' and 'txz'.
578
579       beta   Enable  beta  functionality.  It  recognizes boolean values from
580              'yes'/'no', 'on'/'off', 'true'/'false' and '1'/'0'.
581
582       cache_path_pattern
583              Specify cache path pattern.
584
585       conf_dir
586              List of configuration directories separated with  the  character
587              conventionally  used  by the operating system to separate search
588              path components (as in PATH), such as ':' for POSIX or  ';'  for
589              Windows.   If  also  specified  at command line then values from
590              command line are appended to this value.
591
592       init_manifest
593              Specify default initial manifest.
594
595       inventory_dir
596              Specify inventory directory.
597
598       jobs   Specify number of jobs for parallel processing. If -1  then  the
599              default, number of CPU's in the system is used. If 0 then paral‐
600              lel processing in jobs is disabled. If set  to  positive  number
601              then specified maximum number of processes will be used.
602
603       local_shell
604              Shell command used for local execution.
605
606       out_path
607              Directory to save cdist output in.
608
609       parallel
610              Process  hosts  in  parallel.  If -1 then the default, number of
611              CPU's in the system is used. If 0 then  parallel  processing  of
612              hosts  is  disabled.   If  set to positive number then specified
613              maximum number of processes will be used.
614
615       remote_copy
616              Command to use for remote copy (should behave like scp).
617
618       remote_exec
619              Command to use for remote execution (should behave like ssh).
620
621       remote_out_path
622              Directory to save cdist output in on the target host.
623
624       remote_shell
625              Shell command at remote host used for remote execution.
626
627       save_output_streams
628              Enable/disable saving output streams (enabled by  default).   It
629              recognizes   boolean   values   from   'yes'/'no',   'on'/'off',
630              'true'/'false' and '1'/'0'.
631
632       timestamp
633              Timestamp log messages with the current local date and  time  in
634              the format: YYYYMMDDHHMMSS.us.
635
636       verbosity
637              Set  verbosity  level.  Valid  values  are:  'ERROR', 'WARNING',
638              'INFO', 'VERBOSE', 'DEBUG', 'TRACE' and 'OFF'.
639

FILES

641       ~/.cdist
642              Your personal cdist config directory. If exists it will be auto‐
643              matically used.
644
645       ~/.cdist/cache
646              Local cache directory.
647
648       ~/.cdist/inventory
649              The home inventory directory. If ~/.cdist exists it will be used
650              as default inventory directory.
651
652       ~/.cdist/preos
653              PreOS plugins directory, if existing.
654
655       cdist/conf
656              The distribution configuration directory. It  contains  official
657              types and explorers. This path is relative to cdist installation
658              directory.
659
660       cdist/inventory
661              The distribution inventory directory.  This path is relative  to
662              cdist installation directory.
663
664       cdist/preos
665              The distribution PreOS plugins directory.
666
667       /etc/cdist.cfg
668              Global cdist configuration file, if exists.
669
670       ~/.cdist.cfg or $XDG_CONFIG_HOME/cdist/cdist.cfg
671              Local cdist configuration file, if exists.
672

NOTES

674       cdist  detects  if  host  is  specified  by  IPv6  address.  If so then
675       remote_copy command is executed with host address  enclosed  in  square
676       brackets (see scp(1)).
677

EXAMPLES

679          # Configure ikq05.ethz.ch with debug enabled
680          % cdist config -vvv ikq05.ethz.ch
681
682          # Configure hosts in parallel and use a different configuration directory
683          % cdist config -c ~/p/cdist-nutzung \
684              -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch
685
686          # Use custom remote exec / copy commands
687          % cdist config --remote-exec /path/to/my/remote/exec \
688              --remote-copy /path/to/my/remote/copy \
689              -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch
690
691          # Configure hosts read from file loadbalancers
692          % cdist config -f loadbalancers
693
694          # Configure hosts read from file web.hosts using 16 parallel jobs
695          % cdist config -j 16 -f web.hosts
696
697          # Display banner
698          cdist banner
699
700          # Show help
701          % cdist --help
702
703          # Show Version
704          % cdist --version
705
706          # Enter a shell that has access to emulated types
707          % cdist shell
708          % __git
709          usage: __git --source SOURCE [--state STATE] [--branch BRANCH]
710                       [--group GROUP] [--owner OWNER] [--mode MODE] object_id
711
712          # Install ikq05.ethz.ch with debug enabled
713          % cdist install -vvv ikq05.ethz.ch
714
715          # List inventory content
716          % cdist inventory list -b
717
718          # List inventory for specified host localhost
719          % cdist inventory list -b localhost
720
721          # List inventory for specified tag loadbalancer
722          % cdist inventory list -b -t loadbalancer
723
724          # Add hosts to inventory
725          % cdist inventory add-host -b web1 web2 web3
726
727          # Delete hosts from file old-hosts from inventory
728          % cdist inventory del-host -b -f old-hosts
729
730          # Add tags to specified hosts
731          % cdist inventory add-tag -b -t europe,croatia,web,static web1 web2
732
733          # Add tag to all hosts in inventory
734          % cdist inventory add-tag -b -t vm
735
736          # Delete all tags from specified host
737          % cdist inventory del-tag -b -a localhost
738
739          # Delete tags read from stdin from hosts specified by file hosts
740          % cdist inventory del-tag -b -T - -f hosts
741
742          # Configure hosts from inventory with any of specified tags
743          % cdist config -b -t web dynamic
744
745          # Configure hosts from inventory with all specified tags
746          % cdist config -b -t -a web dynamic
747
748          # Configure all hosts from inventory db
749          $ cdist config -b -A
750
751          # Create default debian PreOS in debug mode
752          $ cdist preos debian /preos/preos-debian -vvvv -C \
753              -k ~/.ssh/id_rsa.pub -p /preos/pxe-debian
754
755          # Create ubuntu PreOS
756          $ cdist preos ubuntu /preos/preos-ubuntu -C \
757              -k ~/.ssh/id_rsa.pub -p /preos/pxe-ubuntu
758
759          # Create ubuntu PreOS on drive /dev/sdb
760          # and set root password to 'password'.
761          $ cdist preos ubuntu /mnt -B -C \
762              -k ~/.ssh/id_rsa.pub -D /dev/sdb \
763              -P password
764

ENVIRONMENT

766       TMPDIR, TEMP, TMP
767              Setup  the  base  directory  for  the  temporary directory.  See
768              http://docs.python.org/py3k/library/tempfile.html    for    more
769              information.  This  is  rather useful, if the standard directory
770              used does not allow executables.
771
772       CDIST_PATH
773              Colon delimited list of config directories.
774
775       CDIST_LOCAL_SHELL
776              Selects shell for local script execution, defaults to /bin/sh.
777
778       CDIST_REMOTE_SHELL
779              Selects shell for remote script execution, defaults to /bin/sh.
780
781       CDIST_OVERRIDE
782              Allow overwriting type parameters.
783
784       CDIST_ORDER_DEPENDENCY
785              Create dependencies based on the execution order.  Note that  in
786              version  6.2.0 semantic of this processing mode is finally fixed
787              and well defined.
788
789       CDIST_REMOTE_EXEC
790              Use this command for remote execution (should behave like ssh).
791
792       CDIST_REMOTE_COPY
793              Use this command for remote copy (should behave like scp).
794
795       CDIST_INVENTORY_DIR
796              Use this directory as inventory directory.
797
798       CDIST_BETA
799              Enable beta functionality.
800
801       CDIST_CACHE_PATH_PATTERN
802              Custom cache path pattern.
803
804       CDIST_CONFIG_FILE
805              Custom configuration file.
806

EXIT STATUS

808       The following exit values shall be returned:
809
810       0   Successful completion.
811
812       1   One or more host configurations failed.
813

AUTHORS

815       Originally written by Nico Schottelius <nico-cdist--@--schottelius.org>
816       and Steven Armstrong <steven-cdist--@--armstrong.cc>.
817

CAVEATS

819       When  operating  in  parallel, either by operating in parallel for each
820       host (-p/--parallel) or by parallel jobs within a host (-j/--jobs), and
821       depending  on target SSH server and its configuration you may encounter
822       connection drops.  This is controlled with sshd MaxStartups  configura‐
823       tion  options.   You may also encounter session open refusal. This hap‐
824       pens with ssh multiplexing when you reach maximum number of  open  ses‐
825       sions  permitted  per network connection. In this case ssh will disable
826       multiplexing.  This limit is controlled with sshd MaxSessions  configu‐
827       ration options. For more details refer to sshd_config(5).
828
829       When  requirements  for  the same object are defined in different mani‐
830       fests (see example below), for example, in init manifest  and  in  some
831       other  type  manifest  and  those  requirements  differ then dependency
832       resolver cannot detect dependencies  correctly.  This  happens  because
833       cdist  cannot prepare all objects first and run all objects afterwards.
834       Some object can depend on the result of type explorer(s) and  explorers
835       are executed during object run. cdist will detect such case and display
836       a warning message. An example of such a case:
837
838          init manifest:
839              __a a
840              require="__e/e" __b b
841              require="__f/f" __c c
842              __e e
843              __f f
844              require="__c/c" __d d
845              __g g
846              __h h
847
848          type __g manifest:
849              require="__c/c __d/d" __a a
850
851          Warning message:
852              WARNING: cdisttesthost: Object __a/a already exists with requirements:
853              /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()
854              /tmp/tmp.cdist.test.ozagkg54/local/759547ff4356de6e3d9e08522b0d0807/data/conf/type/__g/manifest: {'__c/c', '__d/d'}
855              Dependency resolver could not handle dependencies as expected.
856

COPYING

858       Copyright (C) 2011-2019 Nico Schottelius. Free use of this software  is
859       granted  under  the terms of the GNU General Public License v3 or later
860       (GPLv3+).
861
863       ungleich GmbH 2019
864
865
866
867
8686.3.0                            Dec 12, 2019                         CDIST(1)
Impressum