Skip to content

Commit

Permalink
Repair NS entries if they don't match AWS'
Browse files Browse the repository at this point in the history
  • Loading branch information
fridim committed Dec 3, 2024
1 parent d33591a commit b652672
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions playbooks/roles/infra-aws-sandbox/tasks/ddns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| awk '{ print $4 }'
register: _recordfind
ignore_errors: true
changed_when: false

- when: _recordfind is succeeded
set_fact:
Expand Down
10 changes: 10 additions & 0 deletions playbooks/roles/infra-aws-sandbox/tasks/route53.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@
{{ _route53facts.DelegationSet.NameServers
| map('regex_replace', '$', '.') }}
- name: Set the NS records using the Delegation Set
route53:
state: present
zone: "{{ account_name }}{{subdomain_base}}."
record: "{{ account_name }}{{subdomain_base}}."
type: NS
ttl: 600
value: "{{ ns_records }}"
overwrite: true

- name: Add HostedZoneId to the report
lineinfile:
path: "{{ output_dir }}/{{ account_name }}_report.txt"
Expand Down

0 comments on commit b652672

Please sign in to comment.