Implemented msmtp for wordpress

This commit is contained in:
2025-04-03 14:05:00 +02:00
parent fa10fe558d
commit 170636d098
16 changed files with 200 additions and 42 deletions

View File

@@ -1,7 +1,7 @@
---
galaxy_info:
author: "Kevin Veen-Birkenbach"
description: "Installs and configures components for sending email notifications through systemd using msmtp. This role is part of the systemd-notifier suite, providing automated alerts when services fail."
description: "Installs and configures components for sending email notifications. This role is part of the systemd-notifier suite, providing automated alerts when services fail."
license: "CyMaIS NonCommercial License (CNCL)"
license_url: "https://s.veen.world/cncl"
company: |
@@ -22,4 +22,5 @@ galaxy_info:
repository: "https://s.veen.world/cymais"
issue_tracker_url: "https://s.veen.world/cymaisissues"
documentation: "https://s.veen.world/cymais"
dependencies: []
dependencies:
- msmtp

View File

@@ -1,14 +1,3 @@
- name: install smtp-forwarder
pacman: name=smtp-forwarder state=present
when: run_once_systemd_notifier_email is not defined
- name: configure msmtprc.conf.j2
template:
src: "msmtprc.conf.j2"
dest: "/root/.msmtprc"
mode: 600
when: run_once_systemd_notifier_email is not defined
- name: "create {{systemd_notifier_email_folder}}"
file:
path: "{{systemd_notifier_email_folder}}"

View File

@@ -1,20 +0,0 @@
# Set default values for all following accounts.
defaults
auth on
logfile ~/.msmtp.log
tls_starttls {{ 'on' if system_email.start_tls else 'off' }}
{% if system_email.tls %}
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
{% else %}
tls off
{% endif %}
account system_email
host {{system_email.host}}
port {{system_email.port}}
from {{system_email.from}}
user {{system_email.username}}
password {{system_email.password}}
account default : system_email