]> git.phdru.name Git - ansible.git/commitdiff
Feat(phd): Direct root mail to me
authorOleg Broytman <phd@phdru.name>
Wed, 31 Jul 2019 16:09:11 +0000 (19:09 +0300)
committerOleg Broytman <phd@phdru.name>
Wed, 31 Jul 2019 16:33:57 +0000 (19:33 +0300)
Add `root: phd` in `/etc/aliases`.

playbooks/debian/roles/phd/tasks/main.yml

index 1ca3a4b3c8340b70fd436ce2a836328395618a41..a8ea36ee63e6470f0268b39f44761ab65d0ee1ff 100644 (file)
       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