roundcube: merge imapproxy role into roundcube

This commit is contained in:
Victor LABORIE 2017-10-27 17:59:15 +02:00
parent 91d2cce7d4
commit 940be65acb
5 changed files with 34 additions and 18 deletions

View File

@ -1,15 +0,0 @@
---
- name: install imapproxy
apt:
name: imapproxy
state: present
tags:
- imapproxy
- name: enable imapproxy
service:
name: imapproxy
state: started
enabled: True
tags:
- imapproxy

View File

@ -1,2 +1,4 @@
---
roundcube_host: "roundcube.{{ ansible_fqdn }}"
roundcube_imap_host: "localhost"
roundcube_imap_port: 143

View File

@ -0,0 +1,5 @@
---
- name: restart imapproxy
systemd:
name: imapproxy
state: restarted

View File

@ -1,3 +0,0 @@
---
dependencies:
- { role: imapproxy }

View File

@ -16,6 +16,7 @@
name: "{{ item }}"
state: present
with_items:
- imapproxy
- roundcube
- roundcube-sqlite3
- roundcube-plugins
@ -24,6 +25,32 @@
tags:
- roundcube
- name: configure imapproxy imap host
lineinfile:
dest: /etc/imapproxy.conf
regexp: "^server_hostname"
line: "server_hostname {{ roundcube_imap_host }}"
notify: restart imapproxy
tags:
- roundcube
- name: configure imapproxy imap port
lineinfile:
dest: /etc/imapproxy.conf
regexp: "^server_port"
line: "server_port {{ roundcube_imap_port }}"
notify: reload imapproxy
tags:
- roundcube
- name: enable and start imapproxy
service:
name: imapproxy
state: started
enabled: True
tags:
- roundcube
- name: configure roundcube imap host
lineinfile:
dest: /etc/roundcube/config.inc.php