mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Merge pull request #47009 from garethgreenaway/46947_slack_documentation_update_catch_non_dicts
[2018.3] fixes to slack engine documentation
This commit is contained in:
commit
c33de7c82d
@ -33,26 +33,26 @@ In addition, other groups are being loaded from pillars.
|
||||
default:
|
||||
users:
|
||||
- *
|
||||
commands:
|
||||
- test.ping
|
||||
- cmd.run
|
||||
- list_jobs
|
||||
- list_commands
|
||||
aliases:
|
||||
list_jobs:
|
||||
cmd: jobs.list_jobs
|
||||
list_commands:
|
||||
cmd: pillar.get salt:engines:slack:valid_commands target=saltmaster tgt_type=list
|
||||
default_target:
|
||||
target: saltmaster
|
||||
tgt_type: glob
|
||||
targets:
|
||||
test.ping:
|
||||
target: '*'
|
||||
tgt_type: glob
|
||||
cmd.run:
|
||||
commands:
|
||||
- test.ping
|
||||
- cmd.run
|
||||
- list_jobs
|
||||
- list_commands
|
||||
aliases:
|
||||
list_jobs:
|
||||
cmd: jobs.list_jobs
|
||||
list_commands:
|
||||
cmd: pillar.get salt:engines:slack:valid_commands target=saltmaster tgt_type=list
|
||||
default_target:
|
||||
target: saltmaster
|
||||
tgt_type: list
|
||||
tgt_type: glob
|
||||
targets:
|
||||
test.ping:
|
||||
target: '*'
|
||||
tgt_type: glob
|
||||
cmd.run:
|
||||
target: saltmaster
|
||||
tgt_type: list
|
||||
|
||||
:configuration: Example configuration using the 'default' group and a non-default group and a pillar that will be merged in
|
||||
If the user is '*' (without the quotes) then the group's users or commands will match all users as appropriate
|
||||
@ -219,7 +219,7 @@ class SlackClient(object):
|
||||
ret_groups[name]['aliases'].update(config.get('aliases', {}))
|
||||
ret_groups[name]['default_target'].update(config.get('default_target', {}))
|
||||
ret_groups[name]['targets'].update(config.get('targets', {}))
|
||||
except IndexError:
|
||||
except (IndexError, AttributeError):
|
||||
log.warn("Couldn't use group %s. Check that targets is a dict and not a list", name)
|
||||
|
||||
log.debug('Got the groups: %s', ret_groups)
|
||||
|
Loading…
Reference in New Issue
Block a user