Files
operating-automation/playbooks/managed-mailcow/remove-watchdog-mail.yaml
2025-11-19 11:23:50 +01:00

34 lines
922 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: "Check if mailcow.conf exists"
ansible.builtin.stat:
path: "{{ mailcow_dir_result.files[0].path }}/mailcow.conf"
register: mailcow_conf
- name: "Remove WATCHDOG_NOTIFY_EMAIL globally"
ansible.builtin.replace:
path: "{{ mailcow_dir_result.files[0].path }}/mailcow.conf"
regexp: "^WATCHDOG_NOTIFY_EMAIL=info@servercow.de"
replace: "#WATCHDOG_NOTIFY_EMAIL="
backup: yes
register: watchdog
when: mailcow_conf.stat.exists
- name: "Restart mailcow Docker Compose"
vars:
docker_compose_path: "{{ mailcow_dir_result.files[0].path }}"
verbose: false
include_role:
name: managed-mailcow
tasks_from: start-mailcow