upt playbook

This commit is contained in:
jaydee 2023-11-01 01:04:47 +01:00
parent 5f31a2c5f6
commit dd2316de88
2 changed files with 35 additions and 17 deletions

View File

@ -44,6 +44,8 @@
command: docker pause {{ item }} command: docker pause {{ item }}
when: inventory_hostname in groups['raspberry'] when: inventory_hostname in groups['raspberry']
loop: loop:
- nginx-app-1
- heimdall
- mailu2-admin-1 - mailu2-admin-1
- mailu2-antispam-1 - mailu2-antispam-1
- mailu2-antivirus-1 - mailu2-antivirus-1

View File

@ -4,23 +4,39 @@
vars: vars:
arch_name: docker_mailu2_data arch_name: docker_mailu2_data
tasks: tasks:
- name: Start mailu rasp # - name: Start mailu rasp
uri: # uri:
url: "http://192.168.77.106:9000/api/stacks/{{ item }}/start?endpointId=13" # url: "http://192.168.77.106:9000/api/stacks/{{ item }}/start?endpointId=13"
method: POST # method: POST
body_format: form-urlencoded # body_format: form-urlencoded
return_content: yes # return_content: yes
headers: # headers:
Content-Type: "application/json" # Content-Type: "application/json"
X-API-Key: "ptr_DfS2M6Fj2P3fVvYpkhE0KJh2UGCzY47ePaFaLqadsjg=" # X-API-Key: "ptr_DfS2M6Fj2P3fVvYpkhE0KJh2UGCzY47ePaFaLqadsjg="
timeout: 60 # timeout: 60
ignore_errors: yes # ignore_errors: yes
when: inventory_hostname in groups['nas'] # when: inventory_hostname in groups['nas']
# loop:
# - 130
# - 149
# #- 140
# - 180
- name: Start mailu containers
command: docker start {{ item }}
when: inventory_hostname in groups['raspberry']
loop: loop:
- 130 - nginx-app-1
- 149 - heimdall
#- 140 - mailu2-admin-1
- 180 - mailu2-antispam-1
- mailu2-antivirus-1
- mailu2-fetchmail-1
- mailu2-front-1
- mailu2-imap-1
- mailu2-oletools-1
- mailu2-redis-1
- mailu2-resolver-1
- mailu2-smtp-1
- name: Get ruleset - name: Get ruleset
command: nvram get vts_rulelist command: nvram get vts_rulelist