upt playbook

This commit is contained in:
jaydee 2023-08-20 14:15:32 +02:00
parent 21085289c2
commit 745f3389c9

View File

@ -1,6 +1,18 @@
- hosts: nas
name: Stop mailu
tasks:
- name: Stop HA
uri:
url: "http://192.168.77.106:9000/api/stacks/2/stop?endpointId=2"
method: POST
body_format: form-urlencoded
return_content: yes
headers:
Content-Type: "application/json"
X-API-Key: "ptr_DfS2M6Fj2P3fVvYpkhE0KJh2UGCzY47ePaFaLqadsjg="
timeout: 60
register: result
ignore_errors: yes
- name: Start mailu rhasp
uri:
url: "http://192.168.77.106:9000/api/stacks/130/start?endpointId=13"
@ -29,7 +41,18 @@
- name: Create archive
ansible.builtin.shell: 'tar -czf /share/Data/dockers.tar.gz /share/docker_data/{mailu2,webhub,ha} --exclude="/ha/backups/*" --exclude="home-assistant.log*"'
ignore_errors: yes
- name: Start HA
uri:
url: "http://192.168.77.106:9000/api/stacks/2/start?endpointId=2"
method: POST
body_format: form-urlencoded
return_content: yes
headers:
Content-Type: "application/json"
X-API-Key: "ptr_DfS2M6Fj2P3fVvYpkhE0KJh2UGCzY47ePaFaLqadsjg="
timeout: 60
register: result
ignore_errors: yes
- name: Start mailu main
uri:
url: "http://192.168.77.106:9000/api/stacks/108/start?endpointId=2"