Backport PR for fixing NIOS_ZONE module idempotency (#56347)
* To fix the issue where nios_zone module was running second time for same object (#55595)
* fix for 55128 issue
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
* review comment fix
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
(cherry picked from commit 661f7be0fe
)
* changelog for 2.8
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
This commit is contained in:
parent
3fbe6e976c
commit
b66f77352d
2 changed files with 4 additions and 2 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- To fix the nios_zone module idempotency failure - https://github.com/ansible/ansible/pull/55595
|
|
@ -447,8 +447,8 @@ class WapiModule(WapiBase):
|
|||
temp = ib_spec['restart_if_needed']
|
||||
del ib_spec['restart_if_needed']
|
||||
ib_obj = self.get_object(ib_obj_type, obj_filter.copy(), return_fields=ib_spec.keys())
|
||||
# reinstate restart_if_needed key if it's set to true in play
|
||||
if module.params['restart_if_needed']:
|
||||
# reinstate restart_if_needed if ib_obj is none, meaning there's no existing nios_zone ref
|
||||
if not ib_obj:
|
||||
ib_spec['restart_if_needed'] = temp
|
||||
elif (ib_obj_type == NIOS_MEMBER):
|
||||
# del key 'create_token' as nios_member get_object fails with the key present
|
||||
|
|
Loading…
Reference in a new issue