Ansible Role mailto_root
This role enables relaying all mail that is sent to the root user (or other service accounts on the system) to an actual mail account. For example, any output of crontab is sent tho the configured address if this role is applied to the system.
Mandatory Requirements
Install and configure postfix. This can be done using the linuxfabrik.lfops.postfix role.
Install mailx. This can be done using the linuxfabrik.lfops.mailx role.
Mandatory Role Variables
Variable |
Description |
---|---|
|
The sender address from which the relayed mail should be sent. |
|
List recipient addresses to which the mails should be relayed. |
Example:
# mandatory
mailto_root__from: 'noreply@example.com'
mailto_root__to:
- 'root@example.com'
- 'root@other.example'