3
0
forked from jakub/ansible
Files
ansible_fencl/check_stack_nextcloud.yml
2025-10-03 13:36:35 +02:00

29 lines
730 B
YAML

---
- 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