ansible-role-mailserver/tasks/postfixadmin.yml

49 lines
1.2 KiB
YAML
Raw Normal View History

2020-07-22 23:20:10 +02:00
- name: postfixadmin - install
2020-07-22 19:51:50 +02:00
package:
name:
- postfixadmin
2020-07-22 23:20:10 +02:00
- name: postfixadmin - nginx local
2020-07-22 19:51:50 +02:00
notify: reload nginx
2020-07-25 12:55:46 +02:00
# when: mailserver_postfixadmin_domain == ""
2020-07-22 19:51:50 +02:00
template:
src: postfixadmin-local.nginx
dest: /etc/nginx/local.d/postfixadmin.act
2020-07-25 12:55:46 +02:00
- name: postfixadmin - get cert for nginx domain
notify: dehydrated
when: mailserver_postfixadmin_domain != ""
lineinfile:
path: /etc/dehydrated/domains.txt
line: "{{ mailserver_postfixadmin_domain }}"
2020-07-22 23:20:10 +02:00
- name: postfixadmin - nginx domain
2020-07-22 19:51:50 +02:00
notify: reload nginx
when: mailserver_postfixadmin_domain != ""
template:
src: postfixadmin-domain.nginx
dest: /etc/nginx/sites.d/postfixadmin.act
2020-07-22 23:20:10 +02:00
- name: postfixadmin - config
2020-07-22 19:51:50 +02:00
template:
2020-07-24 17:07:52 +02:00
src: postfixadmin-conf.php
2020-07-22 19:51:50 +02:00
dest: /etc/webapps/postfixadmin/config.local.php
2020-07-22 23:20:10 +02:00
- name: postfixadmin - fix config access
2020-07-22 19:51:50 +02:00
file:
path: "/etc/webapps/postfixadmin/{{ item }}"
owner: http
group: http
with_items:
- config.inc.php
- config.local.php
2020-07-22 23:20:10 +02:00
- name: postfixadmin - fix caching access
2020-07-22 19:51:50 +02:00
file:
path: "{{ item }}"
owner: http
group: http
with_items:
- "/usr/share/webapps/postfixadmin/templates_c/"
- "/var/cache/postfixadmin/templates_c/"