cdist-web/src/extra/manual/beta/_sources/cdist-configuration.rst.txt

42 lines
1.5 KiB
Plaintext
Raw Normal View History

2019-04-23 18:55:23 +00:00
Configuration
=============
Description
-----------
cdist obtains configuration data from the following sources in the following
order:
#. command-line options
#. configuration file specified at command-line using -g command line option
#. configuration file specified in CDIST_CONFIG_FILE environment variable
#. environment variables
#. user's configuration file (first one found of ~/.cdist.cfg, $XDG_CONFIG_HOME/cdist/cdist.cfg, in specified order)
#. in-distribution configuration file (cdist/conf/cdist.cfg)
#. system-wide configuration file (/etc/cdist.cfg)
if one exists.
Configuration source with lower ordering number from above has a higher
precedence. Configuration option value read from source with higher
precedence will overwrite option value, if exists, read from source with
lower precedence. That means that command-line option wins them all.
2020-06-17 10:20:44 +00:00
Users can decide on the local configuration file location. It can be either
2019-04-23 18:55:23 +00:00
~/.cdist.cfg or $XDG_CONFIG_HOME/cdist/cdist.cfg. Note that, if both exist,
then ~/.cdist.cfg is used.
For a per-project configuration, particular environment variables or better,
CDIST_CONFIG_FILE environment variable or -g CONFIG_FILE command line option,
can be used.
Config file format
------------------
2019-12-12 07:06:56 +00:00
2019-04-23 18:55:23 +00:00
cdist configuration file is in the INI file format. Currently it supports
only [GLOBAL] section.
2019-12-12 07:06:56 +00:00
Here you can find configuration file skeleton:
2019-04-23 18:55:23 +00:00
2019-12-12 07:06:56 +00:00
.. literalinclude:: cdist.cfg.skeleton
:language: ini