Update certificate path for lego
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2aaaf30ea8
commit
5e69465772
3 changed files with 68 additions and 63 deletions
|
|
@ -14,6 +14,11 @@
|
|||
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
|
||||
|
|
@ -26,67 +31,12 @@
|
|||
- master.cf
|
||||
notify: Restart postfix
|
||||
|
||||
- name: Include tasks for postgrey
|
||||
include_tasks: postgrey.yml
|
||||
when:
|
||||
- postfix_mydestination is defined
|
||||
|
||||
- name: Include tasks for OpenDKM
|
||||
include_tasks: opendkim.yml
|
||||
when:
|
||||
- postfix_mydestination is defined
|
||||
|
||||
- name: Include tasks for OpenDMARC
|
||||
include_tasks: opendmarc.yml
|
||||
when:
|
||||
- postfix_mydestination is defined
|
||||
|
||||
- name: Include dovecot role
|
||||
include_role:
|
||||
name: dovecot
|
||||
when:
|
||||
- postfix_mydestination is defined
|
||||
|
||||
- name: Install Certificat
|
||||
include_role:
|
||||
name: certbot
|
||||
vars:
|
||||
certbot_certname: "{{ postfix_myhostname }}"
|
||||
when:
|
||||
- postfix_mydestination is defined
|
||||
register: certificat_changed
|
||||
|
||||
- name: Restart postfix after certificat installation
|
||||
service:
|
||||
name: postfix
|
||||
status: restarted
|
||||
when:
|
||||
- certificat_changed is changed
|
||||
|
||||
- name: Open Firewalld
|
||||
firewalld:
|
||||
service: smtp
|
||||
permanent: true
|
||||
state: enabled
|
||||
immediate: true
|
||||
when:
|
||||
- postfix_mydestination is defined
|
||||
|
||||
- name: Open Firewalld
|
||||
firewalld:
|
||||
service: smtp-submission
|
||||
permanent: true
|
||||
state: enabled
|
||||
immediate: true
|
||||
when:
|
||||
- postfix_mydestination is defined
|
||||
|
||||
- name: Enable postfix at boot time
|
||||
service:
|
||||
name: postfix
|
||||
enabled: yes
|
||||
state: started
|
||||
when:
|
||||
- postfix_mydestination is defined
|
||||
# when:
|
||||
# - postfix_mydestination is defined
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue