ansible-role-postfix/tasks/main.yml
Adrien Reslinger 5e69465772
All checks were successful
continuous-integration/drone/push Build is passing
Update certificate path for lego
2021-01-04 01:32:01 +01:00

42 lines
895 B
YAML

---
- name: Include vars for {{ ansible_os_family }}
include_vars: "{{ ansible_os_family }}.yml"
- name: Include vars for {{ ansible_os_family }} for Mail Server
include_vars: "{{ ansible_os_family }}_server.yml"
when:
- postfix_mydestination is defined
- name: install packages
package:
name: "{{ postfix_packages }}"
state: present
update_cache: yes
notify: Restart postfix
- name: Include tasks for mail server
include_tasks: server.yml
when:
- postfix_mydestination is defined
- name: Deploy templates
template:
src: etc/postfix/{{ item }}.j2
dest: /etc/postfix/{{ item }}
owner: root
group: root
mode: 0644
with_items:
- main.cf
- master.cf
notify: Restart postfix
- name: Enable postfix at boot time
service:
name: postfix
enabled: yes
state: started
# when:
# - postfix_mydestination is defined