Skip to content

Commit

Permalink
Add env variable for ddns TTL
Browse files Browse the repository at this point in the history
  • Loading branch information
fridim committed Dec 4, 2024
1 parent 51bea09 commit bc47b27
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions conan/conan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ ddns_server=${ddns_server:-"ipaserver"}
ddns_key_name=${ddns_key_name:-mydynamickey}
ddns_key_algorithm=${ddns_key_algorithm:-"hmac-sha512"}
ddns_key_secret=${ddns_key_secret:-}
ddns_ttl=${ddns_ttl:-600}

# Pattern to filter the sandboxes to cleanup
sandbox_filter=${sandbox_filter:-}
Expand Down Expand Up @@ -84,6 +85,7 @@ export ddns_server
export ddns_key_name
export ddns_key_algorithm
export ddns_key_secret
export ddns_ttl
export lock_timeout
export max_retries
export aws_nuke_retries
Expand Down
1 change: 1 addition & 0 deletions conan/wipe_sandbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ sandbox_reset() {
-e ddns_server="${ddns_server}" \
-e ddns_key_name="${ddns_key_name}" \
-e ddns_key_secret="${ddns_key_secret}" \
-e ddns_ttl="${ddns_ttl}" \
-e run_aws_nuke_legacy="${run_aws_nuke_legacy:-false}" \
reset_single.yml > "${logfile}"; then
echo "$(date -uIs) ${sandbox} reset OK"
Expand Down
4 changes: 2 additions & 2 deletions playbooks/roles/infra-aws-sandbox/tasks/ddns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- tags:
- nuke
- ddns
when: operation == 'CREATE' or nuke_sandbox | bool
when: operation in ['CREATE','RESET'] or nuke_sandbox | bool
block:
- name: Fetch all NS records for this sandbox
shell: >-
Expand Down Expand Up @@ -31,7 +31,7 @@
key_secret: "{{ ddns_key_secret }}"
port: "{{ ddns_port | d('53') }}"
type: NS
ttl: 600
ttl: "{{ ddns_ttl | default(600, true) }}"
zone: "{{ ddns_domain }}."
record: "{{ account_name }}.{{ ddns_domain }}."
value: "{{ ns_records }}"
1 change: 0 additions & 1 deletion playbooks/roles/infra-aws-sandbox/tasks/route53.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
zone: "{{ account_name }}{{subdomain_base}}."
record: "{{ account_name }}{{subdomain_base}}."
type: NS
ttl: 600
value: "{{ ns_records }}"
overwrite: true
register: _route53zoneNS
Expand Down

0 comments on commit bc47b27

Please sign in to comment.