mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix disable_<tag-name> config option
Previously, the logic always looked for `disable_<tag-name>s` in the config options. The issue with this is that the following tag names already end with 's': `beacons`, `engines`, `grains`, `log_handlers`, `serializers`, `states`, and `utils`. So previously, if you wanted to disable a beacon, the config option to set is `disable_beaconss` (with 'ss' at the end). Fix this so that we only append an 's' if the tag name does not already end with an 's'. Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
This commit is contained in:
parent
1d93e92194
commit
0f0b7e3e0a
1 changed files with 2 additions and 1 deletions
|
@ -1094,7 +1094,8 @@ class LazyLoader(salt.utils.lazy.LazyDict):
|
|||
virtual_funcs = []
|
||||
self.virtual_funcs = virtual_funcs
|
||||
|
||||
self.disabled = set(self.opts.get('disable_{0}s'.format(self.tag), []))
|
||||
self.disabled = set(self.opts.get('disable_{0}{1}'.format(
|
||||
self.tag, '' if self.tag[-1] == 's' else 's'), []))
|
||||
|
||||
self.refresh_file_mapping()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue