Debian Codegraph @

docs/src/cdist-configuration.rst

raw
1 Configuration
2 =============
3
4 Description
5 -----------
6 cdist obtains configuration data from the following sources in the following
7 order:
8
9 #. command-line options
10 #. configuration file specified at command-line using -g command line option
11 #. configuration file specified in CDIST_CONFIG_FILE environment variable
12 #. environment variables
13 #. user's configuration file (first one found of ~/.cdist.cfg, $XDG_CONFIG_HOME/cdist/cdist.cfg, in specified order)
14 #. in-distribution configuration file (cdist/conf/cdist.cfg)
15 #. system-wide configuration file (/etc/cdist.cfg)
16
17 if one exists.
18
19 Configuration source with lower ordering number from above has a higher
20 precedence. Configuration option value read from source with higher
21 precedence will overwrite option value, if exists, read from source with
22 lower precedence. That means that command-line option wins them all.
23
24 Users can decide on the local configuration file location. It can be either
25 ~/.cdist.cfg or $XDG_CONFIG_HOME/cdist/cdist.cfg. Note that, if both exist,
26 then ~/.cdist.cfg is used.
27
28 For a per-project configuration, particular environment variables or better,
29 CDIST_CONFIG_FILE environment variable or -g CONFIG_FILE command line option,
30 can be used.
31
32 Config file format
33 ------------------
34
35 cdist configuration file is in the INI file format. Currently it supports
36 only [GLOBAL] section.
37
38 Here you can find configuration file skeleton:
39
40 .. literalinclude:: cdist.cfg.skeleton
41 :language: ini