Further dispatcher updates
This commit is contained in:
parent
cebded63fa
commit
e976721d79
23
roles/msmtp/tasks/dispatcher.yml
Normal file
23
roles/msmtp/tasks/dispatcher.yml
Normal 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
|
||||
|
41
roles/msmtp/tasks/frame.yml
Normal file
41
roles/msmtp/tasks/frame.yml
Normal 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
|
||||
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue