From 206f0ced7dd00ae27a313281e6c12e1a73e42918 Mon Sep 17 00:00:00 2001
From: Alexandre Iooss <erdnaxe@crans.org>
Date: Mon, 7 Sep 2020 11:14:36 +0200
Subject: [PATCH] Generalize logo

---
 group_vars/roundcube.yml                              |  5 +++++
 roles/roundcube/templates/roundcube/config.inc.php.j2 | 10 +++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/group_vars/roundcube.yml b/group_vars/roundcube.yml
index 9b772a86..ebc76ac0 100644
--- a/group_vars/roundcube.yml
+++ b/group_vars/roundcube.yml
@@ -24,3 +24,8 @@ roundcube_glob:
     - name: listcommands
     - name: thunderbird_labels
     - name: contextmenu
+  logo:
+    elastic_login: https://www.crans.org/images/crans_black.svg
+    elastic: https://www.crans.org/images/crans.svg
+    larry: https://www.crans.org/images/crans_banner.png
+    classic: https://www.crans.org/images/crans_banner.png
diff --git a/roles/roundcube/templates/roundcube/config.inc.php.j2 b/roles/roundcube/templates/roundcube/config.inc.php.j2
index f49a0d9a..5336f508 100644
--- a/roles/roundcube/templates/roundcube/config.inc.php.j2
+++ b/roles/roundcube/templates/roundcube/config.inc.php.j2
@@ -90,11 +90,11 @@ $config['enable_spellcheck'] = false;
 
 // Custom logo
 $config['skin_logo'] = array(
-    "elastic:login[small]" => "https://www.crans.org/images/crans_black.svg",
-    "elastic:login" => "https://www.crans.org/images/crans_black.svg",
-    "elastic:*" => "https://www.crans.org/images/crans.svg",
-    "larry:*" => "https://www.crans.org/images/crans_banner.png",
-    "classic:*" => "https://www.crans.org/images/crans_banner.png"
+    "elastic:login[small]" => "{{ roundcube.logo.elastic_login }}",
+    "elastic:login" => "{{ roundcube.logo.elastic_login }}",
+    "elastic:*" => "{{ roundcube.logo.elastic }}",
+    "larry:*" => "{{ roundcube.logo.larry }}",
+    "classic:*" => "{{ roundcube.logo.classic }}"
 );
 
 // This domain will be used to form e-mail addresses of new users
-- 
GitLab