Manage DNS servers using Ansible #93

Open
jeltz wants to merge 45 commits from dns into master
Showing only changes of commit 9f8dcecf63 - Show all commits

View file

@ -293,7 +293,9 @@ def make_records(args, ty):
def zones_eq(lhs: dns.zone.Zone, rhs: dns.zone.Zone) -> bool:
"""Returns a `bool` indicating whether two `dns.zone.Zone`s are equal
w.r.t. their text representation."""
return lhs.to_text(relativize=False) == rhs.to_text(relativize=False)
return lhs.to_text(relativize=False, sorted=True) == rhs.to_text(
relativize=False, sorted=True
)
def main() -> int:
@ -365,7 +367,7 @@ def main() -> int:
changed = current is None or not zones_eq(zone, current)
if changed:
zone.to_file(module.params["path"], relativize=False)
zone.to_file(module.params["path"], relativize=True, sorted=True)
changed = module.set_fs_attributes_if_different(file_args, changed)