From: Oleg Broytman Date: Wed, 31 Jul 2019 16:09:11 +0000 (+0300) Subject: Feat(phd): Direct root mail to me X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=d889781c86a0f532ed3d77cb9aedc52ca3d8aa98;p=ansible.git Feat(phd): Direct root mail to me Add `root: phd` in `/etc/aliases`. --- diff --git a/playbooks/debian/roles/phd/tasks/main.yml b/playbooks/debian/roles/phd/tasks/main.yml index 1ca3a4b..a8ea36e 100644 --- a/playbooks/debian/roles/phd/tasks/main.yml +++ b/playbooks/debian/roles/phd/tasks/main.yml @@ -34,4 +34,11 @@ unarchive: src: ~/archive/STORE/phd/Home/phd.tar.bz2 dest: /home + + - name: Add alias + become: true + lineinfile: + path: /etc/aliases + regexp: "^root: phd$" + line: "root: phd" when: phd_exists.results|selectattr('stat.exists')|list|length != 2