From 8a26e73ec4f907094472cfc59400d1da775ab722 Mon Sep 17 00:00:00 2001 From: Christian IUGA Date: Mon, 10 Jul 2023 10:57:47 +0200 Subject: [PATCH 1/2] Support multiple guacamole backend at the same time - mysql (or postgres) database is not replacing the user-mapping - both (or even all backend) can be used at the same time (for testing i was able to use ldap, mysql and user-mapping backend with the same account in guacamole --- defaults/main.yml | 2 +- tasks/config.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 3ecbf92..69f6705 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -81,7 +81,7 @@ guacamole_server_package: "{{ 'guacamole-server-' + guacamole_version + '.tar.gz guacamole_server_port: 4822 -#guacamole_basic_user_mapping: /etc/guacamole/user-mapping.xml +guacamole_basic_user_mapping: /etc/guacamole/user-mapping.xml guacamole_src_dir: /usr/local/src diff --git a/tasks/config.yml b/tasks/config.yml index a3197e9..b5ba4e6 100644 --- a/tasks/config.yml +++ b/tasks/config.yml @@ -37,7 +37,7 @@ - "restart {{ guacamole_tomcat_service }}" - kill guacd - restart guacd - when: not guacamole_mysql_auth and not guacamole_postgresql_auth + when: guacamole_users is defined - name: config | Downloading Auth JDBC Library ansible.builtin.unarchive: From c1e1a8f5ec96088e0ff0537a39f653925e0f60ae Mon Sep 17 00:00:00 2001 From: Christian IUGA Date: Mon, 10 Jul 2023 14:14:58 +0200 Subject: [PATCH 2/2] improve when condition when use user-mapping file add `and guacamole_users | list | length >= 1` on when condition as the variable is defined (but empty) in default/main.yml --- tasks/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/config.yml b/tasks/config.yml index b5ba4e6..402f43d 100644 --- a/tasks/config.yml +++ b/tasks/config.yml @@ -37,7 +37,7 @@ - "restart {{ guacamole_tomcat_service }}" - kill guacd - restart guacd - when: guacamole_users is defined + when: guacamole_users is defined and guacamole_users | list | length >= 1 - name: config | Downloading Auth JDBC Library ansible.builtin.unarchive: