diff options
| author | alex <alex@pdp7.net> | 2026-01-05 13:55:45 +0100 |
|---|---|---|
| committer | alex <alex@pdp7.net> | 2026-01-05 13:55:45 +0100 |
| commit | 23534564dccc97b032c3d043849453072875128f (patch) | |
| tree | a5b278e130df5f1a1a2608d5f523d7590a70ff73 /infrastructure/roles | |
| parent | 9810f33db6152413c15e622296e7bde820bb70f0 (diff) | |
Set up "group mailing lists"
Diffstat (limited to 'infrastructure/roles')
| -rw-r--r-- | infrastructure/roles/mail/tasks/main.yaml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/infrastructure/roles/mail/tasks/main.yaml b/infrastructure/roles/mail/tasks/main.yaml index 513fd81..b96d4dd 100644 --- a/infrastructure/roles/mail/tasks/main.yaml +++ b/infrastructure/roles/mail/tasks/main.yaml @@ -4,3 +4,17 @@ - mutt - urlview - exim4 +- name: set up "group" users + ansible.builtin.user: + name: "{{ item.key }}" + loop: "{{ mail_groups | dict2items }}" + loop_control: + label: "{{ item.key }}" +- name: set up "group" alias + ansible.builtin.blockinfile: + path: /etc/aliases + block: | + root: {{ root_alias }} + {% for group, members in mail_groups.items() %} + {{ group }}: {{ members | join(', ') }}, {{ group }} + {% endfor %} |
