Merge pull request #642 from darko-poljak/support_dist_config_file

Support in-distribution config file
This commit is contained in:
Darko Poljak 2018-03-02 10:03:00 +01:00 committed by GitHub
commit d621dc0afb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View file

@ -275,7 +275,10 @@ class Configuration(metaclass=Singleton):
os.environ.get('XDG_CONFIG_HOME',
os.path.expanduser('~/.config/cdist')),
_config_basename)
default_config_files = (_global_config_file, _local_config_file, )
_dist_config_file = os.path.join(
os.path.abspath(os.path.join(os.path.dirname(cdist.__file__), "conf")),
'cdist.cfg')
default_config_files = (_global_config_file, _dist_config_file, _local_config_file, )
ENV_VAR_CONFIG_FILE = 'CDIST_CONFIG_FILE'
VERBOSITY_VALUES = _VERBOSITY_VALUES

View file

@ -12,6 +12,7 @@ next:
* Core: Fix lost error info with parallel jobs (option -j) (Darko Poljak)
* Core: Fix determining beta value through configuration (Darko Poljak)
* Core: Fix determining save_output_streams value through configuration (Darko Poljak)
* Core: Support in-distribution config file (Darko Poljak)
4.8.0: 2018-02-14
* Core: Skip empty lines in parameter files (Darko Poljak)

View file

@ -11,6 +11,7 @@ order:
#. 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.