ansible-role-postfix_mta/tasks/main.yml

34 lines
639 B
YAML

---
- name: install packages
ansible.builtin.package:
name:
- postfix
- bsd-mailx
tags: postfix
- name: copy file configuration
ansible.builtin.template:
src: main.cf.j2
dest: /etc/postfix/main.cf
owner: root
group: root
mode: 0644
notify: reload postfix
tags: postfix
- name: copy transport configuration
template:
src: transport.j2
dest: /etc/postfix/transport
owner: root
group: root
mode: 0644
notify: map transport
tags: postfix
- name: enable and start service
ansible.builtin.service:
name: postfix
enabled: yes
state: started
tags: postfix