- Quote file modes. Unquoted 644/755 were read as decimal, so files landed as 1204. Templates holding secrets are now 0640 root:docker. - Stop publishing Authentik 9000/9443 and Karakeep 3000 (Caddy reaches them over the docker network), bind dir2opds to the Tailscale IP, and drop Caddy's unused 8448. - Atuin login uses no_log and only runs once; the installer only runs when Atuin is missing. - Make chsh, ufw-docker install, the bat symlink and Atuin dotfiles idempotent. - Back up the Paperless data volume (SQLite DB), stopping Paperless during the backup. - Close public sign-up on kosync and ByteStash. - Replace hardcoded IPs and domains with variables. - Remove teardown tasks and templates for 9 retired services. - Fix the dockcheck comment: it auto-updates labelled containers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
106 lines
3.3 KiB
YAML
106 lines
3.3 KiB
YAML
---
|
|
# dns.yml
|
|
- name: Add A Records for thesatelliteoflove.com and nerder.land
|
|
hosts: localhost
|
|
gather_facts: false
|
|
|
|
vars:
|
|
# Domains to manage DNS records for
|
|
domains:
|
|
- name: thesatelliteoflove.com
|
|
dns_records:
|
|
- name: "home"
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: "git"
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: "social"
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: "auth"
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: "audio"
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: "books"
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: "paper"
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: "snippets"
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: cal
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: loclog
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: watcher
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: models
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: bookmarks
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: gotify
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: gotify-assistant
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: pdg
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: opds
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: sync
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: gokapi
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: nerder.land
|
|
dns_records:
|
|
- name: "forms"
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: "listmonk"
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: "repaircafe"
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: "repair"
|
|
ip: "{{ network.netcup_ip }}"
|
|
|
|
# DNS records to remove for decommissioned services
|
|
removed_records:
|
|
- name: thesatelliteoflove.com
|
|
dns_records:
|
|
- name: "pin"
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: "code"
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: "phlog"
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: "tasks"
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: "post"
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: "files"
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: "kanboard"
|
|
ip: "{{ network.netcup_ip }}"
|
|
- name: "grocy"
|
|
ip: "{{ network.netcup_ip }}"
|
|
|
|
tasks:
|
|
- name: Remove A records for decommissioned services
|
|
amazon.aws.route53:
|
|
state: absent
|
|
zone: "{{ item.0.name }}"
|
|
record: "{{ item.1.name + '.' + item.0.name }}"
|
|
type: A
|
|
ttl: 300
|
|
value: "{{ item.1.ip }}"
|
|
loop: "{{ query('subelements', removed_records, 'dns_records') }}"
|
|
loop_control:
|
|
loop_var: item
|
|
|
|
- name: Add A records for subdomains of each domain
|
|
amazon.aws.route53:
|
|
state: present
|
|
zone: "{{ item.0.name }}"
|
|
record: "{{ item.0.name if item.1.name == '@' else item.1.name + '.' + item.0.name }}"
|
|
type: A
|
|
ttl: 300
|
|
value: "{{ item.1.ip }}"
|
|
loop: "{{ query('subelements', domains, 'dns_records') }}"
|
|
loop_control:
|
|
loop_var: item
|