diff --git a/inv_linuxes_portainer b/inv_linuxes_portainer new file mode 100644 index 0000000..6b771e0 --- /dev/null +++ b/inv_linuxes_portainer @@ -0,0 +1,5 @@ +[linux_servers] +proxmox ansible_host=192.168.69.2 + +[nextcloud_stack] +vm_portainer ansible_host=192.168.69.X ansible_user=root ansible_python_interpreter=/usr/bin/python3 \ No newline at end of file diff --git a/nextcloud/check_stack_nextcloud.yml b/nextcloud/check_stack_nextcloud.yml index 79feec1..c69fae7 100644 --- a/nextcloud/check_stack_nextcloud.yml +++ b/nextcloud/check_stack_nextcloud.yml @@ -1,12 +1,11 @@ +# Comments in English in code: --- - name: Upload and run stack health checks - hosts: proxmox + hosts: nextcloud_stack # <-- dříve 'proxmox' gather_facts: false become: false - vars: health_script_path: /data/compose/nextcloud/stack-health.sh - tasks: - name: Ensure target directory exists ansible.builtin.file: @@ -18,7 +17,6 @@ ansible.builtin.copy: dest: "{{ health_script_path }}" mode: '0755' - # Comments in English: wrap the whole script with {% raw %} ... {% endraw %} so Jinja doesn't eat {{...}} in bash. content: |- {% raw %} #!/usr/bin/env bash @@ -167,11 +165,7 @@ echo "ALL CHECKS PASSED ✅" else echo "----------------------------------------" - echo "ONE OR MORE CHECKS FAILED ❌ (see above)" - fi - - exit "$EXIT" - {% endraw %} + - name: Run stack-health.sh ansible.builtin.shell: "{{ health_script_path }}"