3
0
forked from jakub/ansible

edit init 1

This commit is contained in:
fencl
2025-10-03 13:36:35 +02:00
parent b247ea0832
commit 2b5a2b4a1a
6 changed files with 288 additions and 0 deletions

29
check_stack_nextcloud.yml Normal file
View File

@@ -0,0 +1,29 @@
---
- name: Upload and run stack health checks
hosts: proxmox
become: true
vars:
health_script_path: /data/compose/nextcloud/stack-health.sh
tasks:
- name: Upload stack-health.sh
ansible.builtin.copy:
src: files/stack-health.sh
dest: "{{ health_script_path }}"
mode: '0755'
- name: Run stack-health.sh
ansible.builtin.shell: "{{ health_script_path }}"
register: health
args:
executable: /bin/bash
- name: Show health output
ansible.builtin.debug:
msg: "{{ health.stdout | default('no stdout') }}"
- name: Fail if checks failed (rc != 0)
ansible.builtin.fail:
msg: "Health checks failed"
when: health.rc != 0