31 lines
537 B
YAML
31 lines
537 B
YAML
---
|
|
- name: install packages
|
|
ansible.builtin.package:
|
|
name:
|
|
- postfix
|
|
- bsd-mailx
|
|
tags: postfix
|
|
|
|
- name: copy file configuration
|
|
template:
|
|
src: '{{ item }}.j2'
|
|
dest: '/etc/postfix/{{ item }}'
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
loop:
|
|
- main.cf
|
|
- aliases
|
|
- transport
|
|
notify:
|
|
- reload postfix
|
|
- map aliases
|
|
- map transport
|
|
tags: postfix
|
|
|
|
- name: enable and start service
|
|
ansible.builtin.service:
|
|
name: postfix
|
|
enabled: yes
|
|
state: started
|
|
tags: postfix
|