--- - name: Configure rc.local lineinfile: path: /etc/rc.local line: 'date | mail -s "boot/reboot of $(hostname -s)" {{ general_alert_email }}' create: true tags: - misc - name: Set root mail alias replace: dest: /etc/mail/aliases regexp: "# root:" replace: "root: {{ general_alert_email }}" backup: false notify: - newaliases tags: - mail