Add option to master config reader on ignoring system exit for wrong configuration

This commit is contained in:
Bo Maryniuk 2016-07-13 19:20:27 +02:00
parent 6fc677f177
commit 5f5b802c0c

View file

@ -2905,7 +2905,7 @@ def apply_minion_config(overrides=None,
return opts
def master_config(path, env_var='SALT_MASTER_CONFIG', defaults=None):
def master_config(path, env_var='SALT_MASTER_CONFIG', defaults=None, exit_on_config_errors=False):
'''
Reads in the master configuration file and sets up default options
@ -2932,8 +2932,8 @@ def master_config(path, env_var='SALT_MASTER_CONFIG', defaults=None):
defaults['default_include'])
include = overrides.get('include', [])
overrides.update(include_config(default_include, path, verbose=False))
overrides.update(include_config(include, path, verbose=True))
overrides.update(include_config(default_include, path, verbose=False), exit_on_config_errors=exit_on_config_errors)
overrides.update(include_config(include, path, verbose=True), exit_on_config_errors=exit_on_config_errors)
opts = apply_master_config(overrides, defaults)
_validate_opts(opts)
# If 'nodegroups:' is uncommented in the master config file, and there are