mirror of https://github.com/ceph/ceph-ansible.git
radosgw_user: parse system and admin as boolean
The returned payload from rgw has them as a boolean. By having them as a string it would always report a change and try to modify the user. Signed-off-by: Seena Fallah <seenafallah@gmail.com>pull/7523/head
parent
beb046cba9
commit
a95726c409
|
@ -415,8 +415,8 @@ def run_module():
|
||||||
email = module.params.get('email')
|
email = module.params.get('email')
|
||||||
access_key = module.params.get('access_key')
|
access_key = module.params.get('access_key')
|
||||||
secret_key = module.params.get('secret_key')
|
secret_key = module.params.get('secret_key')
|
||||||
system = str(module.params.get('system')).lower()
|
system = module.params.get('system')
|
||||||
admin = str(module.params.get('admin')).lower()
|
admin = module.params.get('admin')
|
||||||
|
|
||||||
if module.check_mode:
|
if module.check_mode:
|
||||||
module.exit_json(
|
module.exit_json(
|
||||||
|
@ -441,8 +441,8 @@ def run_module():
|
||||||
user = json.loads(out)
|
user = json.loads(out)
|
||||||
current = {
|
current = {
|
||||||
'display_name': user['display_name'],
|
'display_name': user['display_name'],
|
||||||
'system': user.get('system', 'false'),
|
'system': user.get('system', False),
|
||||||
'admin': user.get('admin', 'false')
|
'admin': user.get('admin', False)
|
||||||
}
|
}
|
||||||
asked = {
|
asked = {
|
||||||
'display_name': display_name,
|
'display_name': display_name,
|
||||||
|
|
Loading…
Reference in New Issue