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" mode: "644"
notify: Compile spam-to-folder.sieve notify: Compile spam-to-folder.sieve
- name: Add autoexpunge mailbox config - name: Add autoexpunge mailbox config (Junk)
become: true become: true
ansible.builtin.lineinfile: ansible.builtin.lineinfile:
path: /etc/dovecot/conf.d/15-mailboxes.conf path: /etc/dovecot/conf.d/15-mailboxes.conf
line: " autoexpunge = 30d" line: " autoexpunge = 30d"
insertafter: "mailbox {{ item }}" insertafter: "mailbox Junk"
loop:
- Junk
- Trash
notify: Reload dovecot service notify: Reload dovecot service
- name: Add subscribed mailbox config - name: Add autoexpunge mailbox config (Trash)
become: true become: true
ansible.builtin.lineinfile: ansible.builtin.lineinfile:
path: /etc/dovecot/conf.d/15-mailboxes.conf path: /etc/dovecot/conf.d/15-mailboxes.conf
line: " auto = subscribed" line: " autoexpunge = 30d"
insertafter: 'special_use = \\{{ item }}' insertafter: "mailbox Trash"
loop: notify: Reload dovecot service
- Junk
- Trash - 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 notify: Reload dovecot service
- name: Add imap_sieve plugin - name: Add imap_sieve plugin