mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Moved blocks to include_tasks to raise performance. Deploy was really slow
This commit is contained in:
36
roles/web-app-mailu/tasks/01_core.yml
Normal file
36
roles/web-app-mailu/tasks/01_core.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
- name: "load docker, db and proxy for {{application_id}}"
|
||||
include_role:
|
||||
name: cmp-db-docker-proxy
|
||||
|
||||
- name: "Include the srv-proxy-6-6-tls-deploy role"
|
||||
include_role:
|
||||
name: srv-proxy-6-6-tls-deploy
|
||||
|
||||
- name: Flush docker service handlers
|
||||
meta: flush_handlers
|
||||
|
||||
- name: "Create Mailu accounts"
|
||||
include_tasks: 02_create-mailu-user.yml
|
||||
vars:
|
||||
mailu_compose_dir: "{{ docker_compose.directories.instance }}"
|
||||
mailu_domain: "{{ primary_domain }}"
|
||||
mailu_api_base_url: "http://127.0.0.1:8080/api/v1"
|
||||
mailu_global_api_token: "{{ applications | get_app_conf(application_id, 'credentials.api_token') }}"
|
||||
mailu_action: >-
|
||||
{{
|
||||
(
|
||||
'administrator' in (item.value.get('roles', []))
|
||||
)
|
||||
| ternary('admin','user')
|
||||
}}
|
||||
mailu_user_key: "{{ item.key }}"
|
||||
mailu_user_name: "{{ item.value.username }}"
|
||||
mailu_password: "{{ item.value.password }}"
|
||||
mailu_token_ip: "{{ item.value.ip | default('') }}"
|
||||
loop: "{{ users | dict2items }}"
|
||||
loop_control:
|
||||
loop_var: item
|
||||
|
||||
- name: Set Mailu DNS records
|
||||
include_tasks: 04_set-mailu-dns-records.yml
|
||||
when: dns_provider == 'cloudflare'
|
Reference in New Issue
Block a user