Further dispatcher updates

This commit is contained in:
KemoNine 2020-08-09 01:13:26 -04:00
parent cebded63fa
commit e976721d79
3 changed files with 68 additions and 39 deletions

View file

@ -0,0 +1,23 @@
---
- name: Gather instance facts
setup:
- block:
- name: Generate msmtp configuration file
template:
src: msmtprc
dest: "/opt/misc/msmtprc"
owner: root
group: root
mode: 0644
tags:
- msmtp-config
- name: Generate aliases configuration file
template:
src: aliases
dest: "/opt/misc/aliases"
owner: root
group: root
mode: 0644
tags:
- msmtp-config

View file

@ -0,0 +1,41 @@
---
- name: Gather instance facts
setup:
- name: Update APT package cache
apt:
update_cache: "true"
cache_valid_time: "3600"
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: msmtprc
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

View file

@ -1,40 +1,5 @@
---
- name: Gather instance facts
setup:
- name: Update APT package cache
apt:
update_cache: "true"
cache_valid_time: "3600"
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: msmtprc
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
- include_tasks: "frame.yml"
when: not msmtp_containerized
- include_tasks: "dispatcher.yml"
when: msmtp_containerized