ansible-role-postfix_mta/tasks/main.yml

32 lines
554 B
YAML
Raw Permalink Normal View History

2019-03-05 12:44:14 +00:00
---
2023-06-29 14:19:02 +00:00
- name: Install packages
2021-08-20 16:20:55 +00:00
ansible.builtin.package:
name:
2019-03-07 08:10:54 +00:00
- postfix
- bsd-mailx
2019-03-05 12:44:14 +00:00
tags: postfix
2023-06-29 14:19:02 +00:00
- name: Copy file configuration
ansible.builtin.template:
2021-08-20 16:36:55 +00:00
src: '{{ item }}.j2'
dest: '/etc/postfix/{{ item }}'
2021-08-20 16:30:38 +00:00
owner: root
group: root
mode: 0644
2021-08-20 16:36:55 +00:00
loop:
- main.cf
- aliases
- transport
notify:
2023-06-29 14:19:02 +00:00
- Reload postfix
- Map aliases
- Map transport
2021-08-20 16:30:38 +00:00
tags: postfix
2023-06-29 14:19:02 +00:00
- name: Enable and start service
2021-08-20 16:20:55 +00:00
ansible.builtin.service:
2019-03-05 12:44:14 +00:00
name: postfix
2023-06-29 14:19:02 +00:00
enabled: true
2019-03-05 12:44:14 +00:00
state: started
tags: postfix