You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/roles/postfix/tasks/main.yml

31 lines
576 B
YAML

---
- name: Install postfix
apt:
name: postfix
- name: Configure postfix
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: root
group: root
mode: u=rw,g=,o=
loop:
- src: main.cf.j2
dest: /etc/postfix/main.cf
- src: master.cf.j2
dest: /etc/postfix/master.cf
- src: virtual.j2
dest: /etc/postfix/virtual
- src: vmailbox.j2
dest: /etc/postfix/vmailbox
notify:
- Reload postfix
- name: Enable and start postfix
systemd:
name: postfix.service
state: started
enabled: true
...