Compare commits

..

No commits in common. "bd820e4c53103c3641e22e293558763386e461d5" and "5199779fb2a7d47de33a09149eb2c76371290857" have entirely different histories.

2 changed files with 13 additions and 14 deletions

View File

@ -1,7 +1,7 @@
---
namespace: happydns
name: happydomain
version: 0.4.0
version: 0.3.3
readme: README.md
authors:
- happyDomain Team <happydomain.org>

View File

@ -54,10 +54,9 @@ def main():
for d in domains:
if d.domain == p['domain'] or d.domain == p['domain'] + ".":
for z in d.zone_history:
if p['zone'] is None or z == p['zone']:
zone = d.get_zone(z.id)
if z == p['zone']:
zone = d.get_zone(z)
skipAdd = False
if p['subdomain'].removesuffix(d.domain) in zone.services:
for s in zone.services[p['subdomain'].removesuffix(d.domain)]:
if s._svctype == p['type']:
@ -68,20 +67,19 @@ def main():
differ = True
break
if p['state'] == 'absent' and not differ:
s.delete()
result['changed'] = True
elif p['erase_others']:
if p['erase_others']:
if differ:
s.delete()
result['changed'] = True
else:
skipAdd = True
elif not differ:
module.exit_json(**result)
return
if p['state'] == 'absent':
s.delete()
result['changed'] = True
else:
module.exit_json(**result)
return
if not skipAdd and p['state'] != 'absent':
if p['state'] != 'absent':
zone.add_zone_service(
p['subdomain'].removesuffix(d.domain),
p['type'],
@ -90,9 +88,10 @@ def main():
result['changed'] = True
if p['apply_changes'] and result['changed']:
if p['apply_changes']:
zone.apply_changes()
result['published'] = True
result['changed'] = True
break
else: