ansible-role-mailserver/tasks/postfixadmin.yml

42 lines
991 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:
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/"