feat: Swapped tofu init scripting for ansible scripting

This commit is contained in:
2026-07-13 21:23:31 +01:00
parent cf5504281c
commit c12a507fc1
34 changed files with 471 additions and 501 deletions
+27
View File
@@ -0,0 +1,27 @@
---
- name: Stop every compose stack on each host and prune Docker resources
hosts: all
gather_facts: false
vars_prompt:
- name: confirm
prompt: >-
This runs spindown.sh (docker compose down, then a full
docker image/volume prune -a) on the targeted host(s).
Type 'yes' to continue
private: false
tasks:
- name: Abort unless confirmed
ansible.builtin.fail:
msg: Aborted.
when: confirm != 'yes'
- name: Run spindown.sh
ansible.builtin.command: ./spindown.sh
args:
chdir: "/home/{{ deploy_user }}/services/{{ service_group }}"
register: _spindown
changed_when: true
- name: Show spindown output
ansible.builtin.debug:
var: _spindown.stdout_lines