34 lines
872 B
YAML
34 lines
872 B
YAML
---
|
|
|
|
- name: Enable SNI globally
|
|
hosts: all
|
|
vars:
|
|
debug: false
|
|
tasks:
|
|
|
|
- name: "Get mailcow Installation location"
|
|
include_role:
|
|
name: managed-mailcow
|
|
tasks_from: find-mailcow-composedir
|
|
|
|
- name: "Prüfe ob mailcow.conf exists"
|
|
ansible.builtin.stat:
|
|
path: "{{ mailcow_dir_result.files[0].path }}/mailcow.conf"
|
|
register: mailcow_conf
|
|
|
|
- name: "Setze SNI global ein"
|
|
ansible.builtin.replace:
|
|
path: "{{ mailcow_dir_result.files[0].path }}/mailcow.conf"
|
|
regexp: "^ENABLE_SSL_SNI=n"
|
|
replace: "ENABLE_SSL_SNI=y"
|
|
backup: yes
|
|
register: sni
|
|
when: mailcow_conf.stat.exists
|
|
|
|
- name: "Restart mailcow Docker Compose"
|
|
vars:
|
|
docker_compose_path: "{{ mailcow_dir_result.files[0].path }}"
|
|
include_role:
|
|
name: managed-mailcow
|
|
tasks_from: start-mailcow
|
|
when: sni.changed |