From 33fccf3b5142602c0aa938160ef2199c311fede2 Mon Sep 17 00:00:00 2001 From: Victor LABORIE Date: Wed, 25 Oct 2017 10:46:30 +0200 Subject: [PATCH] roundcube: use lineinfile for configure IMAP server and port --- webapps/roundcube/tasks/main.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/webapps/roundcube/tasks/main.yml b/webapps/roundcube/tasks/main.yml index aa92d1f5..3baf6a74 100644 --- a/webapps/roundcube/tasks/main.yml +++ b/webapps/roundcube/tasks/main.yml @@ -6,10 +6,6 @@ value: "{{ item.value }}" vtype: "{{ item.type }}" with_items: - - { key: 'roundcube/dbconfig-reinstall', type: 'boolean', value: 'true' } - - { key: 'roundcube/language', type: 'select', value: 'fr_FR' } - - { key: 'roundcube/remote/port', type: 'string', value: '1143' } - - { key: 'roundcube/hosts', type: 'string', value: '127.0.0.1' } - { key: 'roundcube/database-type', type: 'select', value: 'sqlite3' } - { key: 'roundcube/db/basepath', type: 'string', value: '/var/lib/roundcube/' } tags: @@ -27,6 +23,23 @@ tags: - roundcube +- name: configure roundcube imap host + lineinfile: + dest: /etc/roundcube/config.inc.php + regexp: "\\$config\\['default_host'\\]" + line: "$config['default_host'] = array('127.0.0.1');" + tags: + - roundcube + +- name: configure roudcube imap port + lineinfile: + dest: /etc/roundcube/config.inc.php + regexp: "\\$config\\['default_port'\\]" + insertafter: "\\$config\\['default_host'\\]" + line: "$config['default_port'] = 1143;" + tags: + - roundcube + - name: configure managesieve plugin copy: src: /usr/share/roundcube/plugins/managesieve/config.inc.php.dist