added new playbooks and tasks
This commit is contained in:
34
playbooks/managed-mailcow/enable-sni-globally.yml
Normal file
34
playbooks/managed-mailcow/enable-sni-globally.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
|
||||
- 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
|
||||
Reference in New Issue
Block a user