Skip to content

Temelio/ansible-role-ssmtp

Repository files navigation

ssmtp

License Build Status Build Status Updates Python 3 Ansible Role GitHub tag

Install ssmtp package.

Requirements

This role requires Ansible 2.4 or higher and platform requirements are listed in the metadata file.

Testing

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

Running tests

Using Docker driver

$ tox

Default role variables

# 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'

Dependencies

None

Example Playbook

- hosts: servers
  roles:
    - { role: Temelio.ssmtp }

License

MIT

Author Information

Lise Machetel (for Temelio company)