Set email aliases for users
This commit is contained in:
parent
8c78c2bbfd
commit
081a0d1af6
1 changed files with 10 additions and 0 deletions
|
@ -39,3 +39,13 @@
|
||||||
append: yes
|
append: yes
|
||||||
when: item.sudo == true
|
when: item.sudo == true
|
||||||
with_items: "{{ users }}"
|
with_items: "{{ users }}"
|
||||||
|
|
||||||
|
- name: Set system email alias
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/aliases
|
||||||
|
state: present
|
||||||
|
regexp: "^{{ item.logname }}:"
|
||||||
|
line: "{{ item.logname }}: {{ item.email }}"
|
||||||
|
notify: Update aliases
|
||||||
|
when: item.email is defined
|
||||||
|
with_items: "{{ users }}"
|
||||||
|
|
Loading…
Reference in a new issue