From e8d34b6ee6c51a68be1ee6ed63485699a4d07b9a Mon Sep 17 00:00:00 2001 From: Seena Fallah Date: Sat, 16 Mar 2024 16:07:02 +0100 Subject: [PATCH] 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 --- library/radosgw_zonegroup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/radosgw_zonegroup.py b/library/radosgw_zonegroup.py index 42075d45b..dac9c1709 100644 --- a/library/radosgw_zonegroup.py +++ b/library/radosgw_zonegroup.py @@ -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 = {