Fix lineinfile tasks

This commit is contained in:
Tunui Franken 2024-07-25 22:10:27 +02:00
parent 6d70a60899
commit e411c82f24

View file

@ -174,26 +174,36 @@
mode: "644"
notify: Compile spam-to-folder.sieve
- name: Add autoexpunge mailbox config
- name: Add autoexpunge mailbox config (Junk)
become: true
ansible.builtin.lineinfile:
path: /etc/dovecot/conf.d/15-mailboxes.conf
line: " autoexpunge = 30d"
insertafter: "mailbox {{ item }}"
loop:
- Junk
- Trash
insertafter: "mailbox Junk"
notify: Reload dovecot service
- name: Add subscribed mailbox config
- name: Add autoexpunge mailbox config (Trash)
become: true
ansible.builtin.lineinfile:
path: /etc/dovecot/conf.d/15-mailboxes.conf
line: " auto = subscribed"
insertafter: 'special_use = \\{{ item }}'
loop:
- Junk
- Trash
line: " autoexpunge = 30d"
insertafter: "mailbox Trash"
notify: Reload dovecot service
- name: Add subscribe mailbox config (Junk)
become: true
ansible.builtin.lineinfile:
path: /etc/dovecot/conf.d/15-mailboxes.conf
line: " auto = subscribe"
insertafter: 'special_use =.*Junk'
notify: Reload dovecot service
- name: Add subscribe mailbox config (Trash)
become: true
ansible.builtin.lineinfile:
path: /etc/dovecot/conf.d/15-mailboxes.conf
line: " auto = subscribe"
insertafter: 'special_use =.*Trash'
notify: Reload dovecot service
- name: Add imap_sieve plugin