]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
radosgw_zonegroup: parse master as boolean
authorSeena Fallah <seenafallah@gmail.com>
Sat, 16 Mar 2024 15:07:02 +0000 (16:07 +0100)
committerGuillaume Abrioux <gabrioux@ibm.com>
Sat, 16 Mar 2024 19:18:15 +0000 (20:18 +0100)
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>
library/radosgw_zonegroup.py

index 42075d45b6d921663731924b0ffbb2fc456a0094..dac9c170964f4da70fb803f2c1185af40db7396b 100644 (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 = {