ansible-role-mailserver/tasks/postfixadmin.yml

42 lines
991 B
YAML

- name: postfixadmin - install
package:
name:
- postfixadmin
- name: postfixadmin - nginx local
notify: reload nginx
when: mailserver_postfixadmin_domain == ""
template:
src: postfixadmin-local.nginx
dest: /etc/nginx/local.d/postfixadmin.act
- name: postfixadmin - nginx domain
notify: reload nginx
when: mailserver_postfixadmin_domain != ""
template:
src: postfixadmin-domain.nginx
dest: /etc/nginx/sites.d/postfixadmin.act
- name: postfixadmin - config
template:
src: postfixadmin-conf.php
dest: /etc/webapps/postfixadmin/config.local.php
- name: postfixadmin - fix config access
file:
path: "/etc/webapps/postfixadmin/{{ item }}"
owner: http
group: http
with_items:
- config.inc.php
- config.local.php
- name: postfixadmin - fix caching access
file:
path: "{{ item }}"
owner: http
group: http
with_items:
- "/usr/share/webapps/postfixadmin/templates_c/"
- "/var/cache/postfixadmin/templates_c/"