49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
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 - get cert for nginx domain
|
|
notify: dehydrated
|
|
when: mailserver_postfixadmin_domain != ""
|
|
lineinfile:
|
|
path: /etc/dehydrated/domains.txt
|
|
line: "{{ mailserver_postfixadmin_domain }}"
|
|
|
|
- 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/"
|