Nsupdate idempotency fix

This commit is contained in:
nerzhul 2017-04-06 17:53:06 +02:00 committed by Toshio Kuratomi
parent 2705e7a8aa
commit 637e9942ff

View file

@ -223,14 +223,15 @@ class RecordManager(object):
self.dns_rc = self.modify_record() self.dns_rc = self.modify_record()
if self.dns_rc != 0: if self.dns_rc != 0:
result['msg'] = "Failed to update DNS record (rc: %d)" % self.dns_rc result['msg'] = "Failed to update DNS record (rc: %d)" % self.dns_rc
if self.dns_rc != 0:
result['failed'] = True
else:
result['changed'] = True
else: else:
result['changed'] = False result['changed'] = False
if self.dns_rc != 0:
result['failed'] = True
else:
result['changed'] = True
return result return result
def create_record(self): def create_record(self):