mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Handle group lists as well as comma-separated group strings.
Fixes #26632
This commit is contained in:
parent
644f003fb2
commit
d235abf907
1 changed files with 2 additions and 0 deletions
|
@ -911,6 +911,8 @@ def _role_cmd_args(name,
|
|||
if sub_cmd.endswith('WITH'):
|
||||
sub_cmd = sub_cmd.replace(' WITH', '')
|
||||
if groups:
|
||||
if isinstance(groups, list):
|
||||
groups = ','.join(groups)
|
||||
for group in groups.split(','):
|
||||
sub_cmd = '{0}; GRANT "{1}" TO "{2}"'.format(sub_cmd, group, name)
|
||||
return sub_cmd
|
||||
|
|
Loading…
Add table
Reference in a new issue