initial commit
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
75891c3271
129 changed files with 8046 additions and 0 deletions
19
roles/mail/tasks/aliases.yml
Normal file
19
roles/mail/tasks/aliases.yml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# read-only docker exec always reports changed; changed_when: false suppresses spurious output
|
||||
- name: List existing mail aliases
|
||||
command: docker exec mailserver setup alias list
|
||||
register: mail_alias_list
|
||||
changed_when: false
|
||||
tags:
|
||||
- users
|
||||
|
||||
- name: Create mail aliases if missing
|
||||
command: >
|
||||
docker exec mailserver
|
||||
setup alias add {{ item.from }}
|
||||
{{ item.to if item.to is string else item.to | join(',') }}
|
||||
loop: "{{ mail_aliases }}"
|
||||
when: item.from not in mail_alias_list.stdout
|
||||
tags:
|
||||
- users
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue