mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Fix adding tenant to keystone user with no previous tenant assigned
This commit is contained in:
parent
eb03e88c60
commit
c1642db1d0
@ -138,7 +138,8 @@ def user_present(name,
|
||||
**connection_args)
|
||||
ret['comment'] = 'User "{0}" has been updated'.format(name)
|
||||
ret['changes']['Enabled'] = 'Now {0}'.format(enabled)
|
||||
if tenant and user[name]['tenant_id'] != tenant_id:
|
||||
if tenant and ('tenant_id' not in user[name] or
|
||||
user[name]['tenant_id'] != tenant_id):
|
||||
__salt__['keystone.user_update'](name=name, tenant=tenant,
|
||||
profile=profile,
|
||||
**connection_args)
|
||||
|
Loading…
Reference in New Issue
Block a user