Fix OpenStack keystone domain idempotency (#20637)
Without this patch, the os_keystone_domain module is not idempotent if the description is empty because the description parameter is None in ansible, but the keystone client returns an empty unicode string. Following the example of other OpenStack modules, this patch fixes the issue by checking whether the module parameter is None before going on to check its value.
This commit is contained in:
parent
af59781b56
commit
0890559ab5
1 changed files with 2 additions and 1 deletions
|
@ -106,7 +106,8 @@ id:
|
|||
'''
|
||||
|
||||
def _needs_update(module, domain):
|
||||
if domain.description != module.params['description']:
|
||||
if module.params['description'] is not None and \
|
||||
domain.description != module.params['description']:
|
||||
return True
|
||||
if domain.enabled != module.params['enabled']:
|
||||
return True
|
||||
|
|
Loading…
Reference in a new issue