Install ssmtp package.
This role requires Ansible 2.4 or higher and platform requirements are listed in the metadata file.
This role use Molecule to run tests.
Local and Travis tests run tests on Docker by default. See molecule documentation to use other backend.
Currently, tests are done on:
- Debian Stretch
- Ubuntu Trusty
- Ubuntu Xenial
- Ubuntu Bionic
and use:
- Ansible 2.4.x
- Ansible 2.5.x
- Ansible 2.6.x
- Ansible 2.7.x
$ tox
# Repository & package management
ssmtp_prerequisites_packages: "{{ _ssmtp_prerequisites_packages }}"
ssmtp_repository_cache_valid_time: 3600
ssmtp_repository_update_cache: 'True'
# ssmtp user and group
ssmtp_user_name: 'root'
ssmtp_group_name: 'mail'
# Path management
ssmtp_paths:
dirs:
config:
path: '/etc/ssmtp'
files:
main_config:
path: '/etc/ssmtp/ssmtp.conf'
owner: "{{ ssmtp_user_name }}"
group: "{{ ssmtp_group_name }}"
mode: '0640'
revaliases_config:
path: '/etc/ssmtp/revaliases'
owner: "{{ ssmtp_user_name }}"
group: "{{ ssmtp_group_name }}"
mode: '0640'
# ssmtp config
ssmtp_root_recipient: 'admin@example.com'
ssmtp_mailhub: 'mail.example.com'
ssmtp_mailhub_port: '25'
ssmtp_from_line_override: 'YES'
ssmtp_use_STARTTLS: 'YES'
ssmtp_authUser: 'user@example.com'
ssmtp_authPass: 'change me'
None
- hosts: servers
roles:
- { role: Temelio.ssmtp }
MIT
Lise Machetel (for Temelio company)
- https://temelio.com
- lise.machetel [at] temelio.com