From d889781c86a0f532ed3d77cb9aedc52ca3d8aa98 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 31 Jul 2019 19:09:11 +0300 Subject: [PATCH] Feat(phd): Direct root mail to me Add `root: phd` in `/etc/aliases`. --- playbooks/debian/roles/phd/tasks/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.39.5