ansible-role-mailserver/tasks/postfixadmin.yml

42 lines
992 B
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
when: mailserver_postfixadmin_domain == ""
template:
src: postfixadmin-local.nginx
dest: /etc/nginx/local.d/postfixadmin.act
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:
src: postfixadmin.local.php
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/"