41 lines
930 B
YAML
41 lines
930 B
YAML
|
---
|
||
|
- name: Gather instance facts
|
||
|
setup:
|
||
|
- name: Update APT package cache
|
||
|
apt:
|
||
|
update_cache: "{{ wireguard_ubuntu_update_cache }}"
|
||
|
cache_valid_time: "{{ wireguard_ubuntu_cache_valid_time }}"
|
||
|
tags:
|
||
|
- msmtp-install
|
||
|
- name: Install msmtp
|
||
|
package:
|
||
|
name: "{{ packages }}"
|
||
|
state: present
|
||
|
vars:
|
||
|
packages:
|
||
|
- msmtp
|
||
|
- msmtp-mta
|
||
|
- ca-certificates
|
||
|
tags:
|
||
|
- msmtp-install
|
||
|
|
||
|
- block:
|
||
|
- name: Generate msmtp configuration file
|
||
|
template:
|
||
|
src: msmtp
|
||
|
dest: "/etc/msmtprc"
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: 0644
|
||
|
tags:
|
||
|
- msmtp-config
|
||
|
- name: Generate aliases configuration file
|
||
|
template:
|
||
|
src: aliases
|
||
|
dest: "/etc/aliases"
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: 0644
|
||
|
tags:
|
||
|
- msmtp-config
|