From 967ce9e5f6cb28c11961d59d919240ce8eea48e2 Mon Sep 17 00:00:00 2001 From: Sergei Poljanski Date: Thu, 12 Nov 2026 23:23:56 +0400 Subject: [PATCH] terraform: drop the DNS import blocks Both zones and all record sets are in state now; the import blocks did their job. A plan without them shows no changes. Assisted-by: Claude:opus-5-5 --- .../minecraft_fossils/handlers/main.yaml | 4 -- .../roles/minecraft_fossils/tasks/main.yaml | 39 ------------------- terraform/dns.tf | 14 ------- 3 files changed, 57 deletions(-) delete mode 100644 ansible/roles/minecraft_fossils/handlers/main.yaml delete mode 100644 ansible/roles/minecraft_fossils/tasks/main.yaml diff --git a/ansible/roles/minecraft_fossils/handlers/main.yaml b/ansible/roles/minecraft_fossils/handlers/main.yaml deleted file mode 100644 index c28484f..0000000 --- a/ansible/roles/minecraft_fossils/handlers/main.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- name: Reload systemd - ansible.builtin.systemd: - daemon_reload: true diff --git a/ansible/roles/minecraft_fossils/tasks/main.yaml b/ansible/roles/minecraft_fossils/tasks/main.yaml deleted file mode 100644 index 3994dcf..0000000 --- a/ansible/roles/minecraft_fossils/tasks/main.yaml +++ /dev/null @@ -1,39 +0,0 @@ ---- -# Retired: the Fabric server is stopped for good to free its 8 GB of -# RAM. The world stays in /opt/minecraft-fossils/data (and in the restic -# backups) until it is deleted by hand. -- name: Check for the old deployment - ansible.builtin.stat: - path: /opt/minecraft-fossils/docker-compose.yml - register: fossils_compose - -- name: Save the world - ansible.builtin.command: docker exec minecraft-fossils rcon-cli save-all flush - when: fossils_compose.stat.exists - register: fossils_save - changed_when: fossils_save.rc == 0 - failed_when: false - -- name: Stop and remove the containers (data stays) - community.docker.docker_compose_v2: - project_src: /opt/minecraft-fossils - project_name: minecraft-fossils - state: absent - timeout: 120 - when: fossils_compose.stat.exists - -- name: Disable the daily restart timer - ansible.builtin.systemd: - name: minecraft-fossils-restart.timer - enabled: false - state: stopped - failed_when: false - -- name: Remove the restart units - ansible.builtin.file: - path: "/etc/systemd/system/{{ item }}" - state: absent - loop: - - minecraft-fossils-restart.service - - minecraft-fossils-restart.timer - notify: Reload systemd diff --git a/terraform/dns.tf b/terraform/dns.tf index b9d6331..1c145c3 100644 --- a/terraform/dns.tf +++ b/terraform/dns.tf @@ -145,17 +145,3 @@ resource "hcloud_zone_rrset" "rr" { change_protection = !can(regex(local.unprotected, each.value.name)) records = [for value in each.value.records : { value = value }] } - -# Adopted from the existing zones on 2026-11-12. Harmless once in state; -# remove after the first apply if you like. -import { - for_each = local.zones - to = hcloud_zone.zone[each.key] - id = each.key -} - -import { - for_each = local.rrsets - to = hcloud_zone_rrset.rr[each.key] - id = each.key -}