mirror of https://github.com/ceph/ceph-ansible.git
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>
(cherry picked from commit e8d34b6ee6
)
pull/7519/head
parent
fb76ea3cca
commit
0f4dcae54b
|
@ -343,7 +343,7 @@ def run_module():
|
||||||
name = module.params.get('name')
|
name = module.params.get('name')
|
||||||
state = module.params.get('state')
|
state = module.params.get('state')
|
||||||
endpoints = module.params.get('endpoints')
|
endpoints = module.params.get('endpoints')
|
||||||
master = str(module.params.get('master')).lower()
|
master = module.params.get('master')
|
||||||
|
|
||||||
if module.check_mode:
|
if module.check_mode:
|
||||||
module.exit_json(
|
module.exit_json(
|
||||||
|
@ -372,7 +372,7 @@ def run_module():
|
||||||
realm = json.loads(_out)
|
realm = json.loads(_out)
|
||||||
current = {
|
current = {
|
||||||
'endpoints': zonegroup['endpoints'],
|
'endpoints': zonegroup['endpoints'],
|
||||||
'master': zonegroup.get('is_master', 'false'),
|
'master': zonegroup.get('is_master', False),
|
||||||
'realm_id': zonegroup['realm_id']
|
'realm_id': zonegroup['realm_id']
|
||||||
}
|
}
|
||||||
asked = {
|
asked = {
|
||||||
|
|
Loading…
Reference in New Issue