diff options
author | Dmitry Ilvokhin <d@ilvokhin.com> | 2024-04-07 13:00:46 +0100 |
---|---|---|
committer | Dmitry Ilvokhin <d@ilvokhin.com> | 2024-04-07 13:00:46 +0100 |
commit | 5c4135af7d147d2333e0fa30388ea0a9d362b369 (patch) | |
tree | 25d9589c063dec5baf6f8de54f70f0554adf3378 | |
parent | 197787c89401d0a2b02f9bd1a90873702a3c0604 (diff) | |
download | infra-5c4135af7d147d2333e0fa30388ea0a9d362b369.tar.gz infra-5c4135af7d147d2333e0fa30388ea0a9d362b369.tar.bz2 infra-5c4135af7d147d2333e0fa30388ea0a9d362b369.zip |
Setup correct alias for root mail
-rw-r--r-- | roles/postfix/tasks/main.yml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/roles/postfix/tasks/main.yml b/roles/postfix/tasks/main.yml index 63a760d..4856225 100644 --- a/roles/postfix/tasks/main.yml +++ b/roles/postfix/tasks/main.yml @@ -5,6 +5,20 @@ - postfix-pcre state: present +- name: Setup correct alias for root mail + ansible.builtin.lineinfile: + dest: /etc/postfix/aliases + state: present + # YAML requires escape string to be encoded in double quotes. + regexp: "^(#)?root:\t\t(you|d)" + line: "root:\t\td" + owner: root + group: root + mode: u+rw,g+r,o+r + notify: + - Update aliases + - Reload postfix + - name: Copy postfix lookup tables ansible.builtin.copy: src: '{{ item }}' |