diff --git a/cron_generate.go b/cron_generate.go index 8ca7601..996ddfe 100644 --- a/cron_generate.go +++ b/cron_generate.go @@ -33,7 +33,7 @@ func generateZonefiles() { ctx, cancel := context.WithTimeout(context.Background(), 59*time.Second) defer cancel() - cmd := exec.CommandContext(ctx, "/usr/bin/python", "generateZonefiles.py") + cmd := exec.CommandContext(ctx, "/usr/bin/python3", "generateZonefiles.py") cmd.Stdout = iw cmd.Stderr = ew cmd.Dir = "/src" diff --git a/generateZonefiles.py b/generateZonefiles.py index eb3c481..1cc1f03 100644 --- a/generateZonefiles.py +++ b/generateZonefiles.py @@ -63,8 +63,6 @@ def resolve_alias(entry): raise Exception( "Alias {} was not resolvable: No answers!".format(entry['alias'])) - answers.sort() - for rdata in answers: new_entry = entry.copy() del new_entry['alias'] @@ -72,7 +70,7 @@ def resolve_alias(entry): new_entry['data'] = rdata.address result.append(new_entry) - return result + return sorted(result, key=lambda k: k['data']) def sanitize(entry): diff --git a/zones.yml b/zones.yml index 796c728..17c67e2 100644 --- a/zones.yml +++ b/zones.yml @@ -218,7 +218,6 @@ zones: records: - 4j6vz7jbf3vama3f45pkmzjjliqgirqc.dkim.amazonses.com. - name: ark - ttl: type: A records: - 31.214.232.18