mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #28021 from blueyed/recursive-include
Handle includes in `include_config` recursively
This commit is contained in:
commit
858875e9fd
1 changed files with 8 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue