vm-ansible/roles/internalsmtp/tasks/main.yaml

40 lines
715 B
YAML
Raw Normal View History

---
- name: "Install Postfix via apt"
apt:
update_cache: yes
state: present
name:
- postfix
- name: Install Postfix forwarder config
template:
src: templates/main.cf
dest: /etc/postfix/main.cf
- name: Restart Postfix
service:
name: postfix
state: restarted
enabled: yes
2022-05-29 15:15:02 +02:00
- name: "Install postfix exporter"
apt:
update_cache: yes
state: present
name:
- prometheus-postfix-exporter
2022-05-29 15:24:02 +02:00
- name: Enable and restart exporter daemon
service:
name: prometheus-postfix-exporter
state: restarted
enabled: yes
2022-05-29 15:15:02 +02:00
- name: Allow postfix exporter via ufw
community.general.ufw:
rule: allow
port: 9706
proto: tcp
src: 192.168.69.0/24
2022-04-16 19:55:29 +02:00
...