27 lines
634 B
YAML
27 lines
634 B
YAML
---
|
|
|
|
- name: Garbage Cleaner ändern
|
|
hosts: all
|
|
tasks:
|
|
|
|
- name: "Prüfe ob mailcow.conf exists"
|
|
ansible.builtin.stat:
|
|
path: /opt/mailcow-dockerized/mailcow.conf
|
|
register: mailcow_conf
|
|
|
|
- name: "Setze Garbage Cleaner auf 7 Tage"
|
|
ansible.builtin.replace:
|
|
path: "/opt/mailcow-dockerized/mailcow.conf"
|
|
regexp: "^MAILDIR_GC_TIME=.*"
|
|
replace: "MAILDIR_GC_TIME=10080"
|
|
backup: yes
|
|
register: gc
|
|
when: mailcow_conf.stat.exists
|
|
|
|
- name: "Starte mailcow Container neu"
|
|
ansible.builtin.shell: |
|
|
cd /opt/mailcow-dockerized
|
|
docker compose up -d
|
|
when: gc.changed
|
|
|