diff --git a/plugins/module_utils/api.py b/plugins/module_utils/api.py index 2c1ecf09..f04effa2 100644 --- a/plugins/module_utils/api.py +++ b/plugins/module_utils/api.py @@ -511,7 +511,7 @@ def run(self, ib_obj_type, ib_spec): result['changed'] = True if not self.module.check_mode and res is None: proposed_object = self.on_update(proposed_object, ib_spec) - self.update_object(ref, proposed_object) + res = self.update_object(ref, proposed_object) result['changed'] = True if ib_obj_type == NIOS_HOST_RECORD and res: @@ -526,7 +526,6 @@ def run(self, ib_obj_type, ib_spec): ipv4addr = proposed['ipv4addr'] if ipv4addr in ref_dict and 'use_for_ea_inheritance' in proposed: self.update_object(ref_dict[ipv4addr], {'use_for_ea_inheritance': proposed['use_for_ea_inheritance']}) - elif state == 'absent': if ref is not None: if 'ipv4addrs' in proposed_object: