ansible-role-postfix_mta/tasks/main.yml

32 lines
537 B
YAML
Raw Normal View History

2019-03-05 12:44:14 +00:00
---
2019-03-07 08:10:54 +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
- name: copy file configuration
2021-08-20 16:30:38 +00:00
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:
- reload postfix
- map aliases
- map transport
2021-08-20 16:30:38 +00:00
tags: postfix
2019-03-05 12:44:14 +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
enabled: yes
state: started
tags: postfix