diff --git a/ubuntu/roles/common/files/aliases b/ubuntu/roles/common/files/aliases new file mode 100644 index 0000000..d41373a --- /dev/null +++ b/ubuntu/roles/common/files/aliases @@ -0,0 +1,3 @@ +# See man 5 aliases for format +postmaster: root +root: s+cron@sadiqs.com diff --git a/ubuntu/roles/common/handlers/main.yml b/ubuntu/roles/common/handlers/main.yml index 2cc2d20..974af37 100644 --- a/ubuntu/roles/common/handlers/main.yml +++ b/ubuntu/roles/common/handlers/main.yml @@ -3,3 +3,5 @@ service: name=rsyslog state=restarted - name: restart cron service: name=cron state=restarted +- name: newaliases + shell: newaliases diff --git a/ubuntu/roles/common/tasks/main.yml b/ubuntu/roles/common/tasks/main.yml index 668125d..5d83fff 100644 --- a/ubuntu/roles/common/tasks/main.yml +++ b/ubuntu/roles/common/tasks/main.yml @@ -69,3 +69,7 @@ - chrony - name: Ensure that the periodic APT cron task clears out old kernels and does unattended security upgrades copy: src=10periodic dest=/etc/apt/apt.conf.d/10periodic backup=yes owner=root group=root mode=0644 +- name: Copy over our aliases file + copy: src=aliases dest=/etc/aliases + notify: + - newaliases