radosgw_zonegroup: parse master as boolean

The returned payload from rgw has is_master as a boolean. By having master as a string it would always report a change and try to modify the zonegroup.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
pull/7523/head
Seena Fallah 2024-03-16 16:07:02 +01:00 committed by Guillaume Abrioux
parent f0b4cc3f0d
commit e8d34b6ee6
1 changed files with 2 additions and 2 deletions

View File

@ -343,7 +343,7 @@ def run_module():
name = module.params.get('name')
state = module.params.get('state')
endpoints = module.params.get('endpoints')
master = str(module.params.get('master')).lower()
master = module.params.get('master')
if module.check_mode:
module.exit_json(
@ -372,7 +372,7 @@ def run_module():
realm = json.loads(_out)
current = {
'endpoints': zonegroup['endpoints'],
'master': zonegroup.get('is_master', 'false'),
'master': zonegroup.get('is_master', False),
'realm_id': zonegroup['realm_id']
}
asked = {