home-server/roles/msmtp/tasks/main.yml

45 lines
1.1 KiB
YAML

---
# The home-server project produces a multi-purpose setup using Ansible.
# Copyright © 2018 Y. Gablin, under the GPL-3.0-or-later license.
# Full licensing information in the LICENSE file, or gnu.org/licences/gpl-3.0.txt if the file is missing.
### UPSTREAM BEGIN ⇒ ###
- name: pull prerequisites from upstream
include_role: name=etckeeper.inc allow_duplicates=true tasks_from=upstream.yml
vars:
msg: msmtp
### ⇐ UPSTREAM BEGIN ###
- name: install msmtp
package:
name: "{{item}}"
with_items:
- msmtp
- msmtp-mta
### UPSTREAM END ⇒ ###
- name: merge upstream
include_role: name=etckeeper.inc allow_duplicates=true tasks_from=merge.yml
vars:
msg: msmtp
### ⇐ UPSTREAM END ###
- name: msmtp configuration
copy:
content: |
account default
host {{DMZ}}
auto_from on
maildomain {{net_soa}}
tls off
syslog LOG_MAIL
dest: /etc/msmtprc
mode: 0644
### LOCAL COMMIT ⇒ ###
- name: commit local changes
include_role: name=etckeeper.inc allow_duplicates=true tasks_from=local.yml
vars:
msg: msmtp
### ⇐ LOCAL COMMIT ###