mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #28021 from blueyed/recursive-include
Handle includes in `include_config` recursively
This commit is contained in:
commit
858875e9fd
@ -1497,7 +1497,14 @@ def include_config(include, orig_path, verbose):
|
||||
|
||||
for fn_ in sorted(glob.glob(path)):
|
||||
log.debug('Including configuration from {0!r}'.format(fn_))
|
||||
salt.utils.dictupdate.update(configuration, _read_conf_file(fn_))
|
||||
opts = _read_conf_file(fn_)
|
||||
|
||||
include = opts.get('include', [])
|
||||
if include:
|
||||
opts.update(include_config(include, fn_, verbose))
|
||||
|
||||
salt.utils.dictupdate.update(configuration, opts)
|
||||
|
||||
return configuration
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user