forked from jakub/ansible
Add Nextcloud deployment and management playbooks
- Introduced playbooks for health checks, Collabora updates, Nextcloud backups, upgrades, and Redis updates. - Each playbook includes necessary tasks for managing services in a Docker environment.
This commit is contained in:
29
nextcloud/check_stack_nextcloud.yml
Normal file
29
nextcloud/check_stack_nextcloud.yml
Normal 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
|
||||
Reference in New Issue
Block a user