mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fixed issue number #30117 - When no parameters are given to a service, the service object is of type None and thus isn't iterable. This is contrary to the documentation which states that there are default values. Default values added as False
This commit is contained in:
parent
54b9641330
commit
51b57f1820
1 changed files with 10 additions and 0 deletions
|
@ -72,6 +72,16 @@ def beacon(config):
|
|||
ret_dict = {}
|
||||
ret_dict[service] = {'running': __salt__['service.status'](service)}
|
||||
|
||||
# If no options is given to the service, we fall back to the defaults
|
||||
# assign a False value to oncleanshutdown and onchangeonly. Those
|
||||
# key:values are then added to the service dictionary.
|
||||
if config[service] is None:
|
||||
defaults = {
|
||||
'oncleanshutdown':False,
|
||||
'onchangeonly':False
|
||||
}
|
||||
config[service] = defaults
|
||||
|
||||
# We only want to report the nature of the shutdown
|
||||
# if the current running status is False
|
||||
# as well as if the config for the beacon asks for it
|
||||
|
|
Loading…
Add table
Reference in a new issue