ansible-role-mailserver/tasks/postfixadmin.yml

42 lines
931 B
YAML

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