move files
This commit is contained in:
26
playbooks/managed-mailcow/change-garbagecleaner.yaml
Normal file
26
playbooks/managed-mailcow/change-garbagecleaner.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user