Skip to content

Commit 3b00228

Browse files
authored
Swap a and cname records for the nn zone (#260)
* swap a and cname * Update generate_nn.py * add validations
1 parent 628e894 commit 3b00228

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.github/workflows/pull_request.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,17 @@ jobs:
2222
- name: Terraform format
2323
run: terraform fmt -check
2424
working-directory: sld
25-
25+
26+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 #@v5
27+
with:
28+
python-version: '3.11'
29+
30+
- name: Setup libraries
31+
run: pip install --require-hashes -r requirements.txt
32+
2633
- name: Setup kzonecheck
2734
run: sudo apt-get update && sudo apt-get install -y knot-dnssecutils
28-
35+
2936
- name: Run kzonecheck on each zone file
3037
run: find . -type f -name "*.zone" -print0 | xargs -0L1 kzonecheck -v
3138

generate_nn.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22

33
header = """$TTL 300
4-
@ SOA nycmesh-713-dns-auth-3 hostmaster.nycmesh.net. ( 2025052100 1d 2h 4w 1h )
4+
@ SOA ( nycmesh-713-dns-auth-3 hostmaster.nycmesh.net. 2025052100 1d 2h 4w 1h )
55
@ NS nycmesh-713-dns-auth-3
66
77
nycmesh-10-dns-auth-5 A 23.158.16.23
@@ -18,5 +18,5 @@ def get_nn_ip(nn_s):
1818
with open("nn.zone", "w") as fd:
1919
fd.write(header)
2020
for nn in range(1, 8001):
21-
fd.write(f"nn{nn} A {get_nn_ip(str(nn))}\n")
22-
fd.write(f"{nn} CNAME nn{nn}\n")
21+
fd.write(f"{nn} A {get_nn_ip(str(nn))}\n")
22+
fd.write(f"nn{nn} CNAME {nn}\n")

0 commit comments

Comments
 (0)