26 lines
434 B
YAML
26 lines
434 B
YAML
---
|
|
- name: install packages
|
|
apt:
|
|
name: '{{ packages }}'
|
|
vars:
|
|
packages:
|
|
- postfix
|
|
- bsd-mailx
|
|
tags: postfix
|
|
|
|
- name: copy file configuration
|
|
template:
|
|
src: main.cf.j2
|
|
dest: /etc/postfix/main.cf
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
notify: reload postfix
|
|
tags: postfix
|
|
|
|
- name: enable and start service
|
|
systemd:
|
|
name: postfix
|
|
enabled: yes
|
|
state: started
|
|
tags: postfix
|