From 4c115a8b342a157e1fface355ad35bbbdfe45302 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Mon, 22 Feb 2021 15:09:47 +0100 Subject: [PATCH] [thelounge] Don't load ldap configuration if it is disabled Signed-off-by: Yohann D'ANELLO --- host_vars/irc.adm.crans.org.yml | 2 +- plays/nginx.yml | 2 +- roles/thelounge/templates/config.js.j2 | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/host_vars/irc.adm.crans.org.yml b/host_vars/irc.adm.crans.org.yml index bf956da8..a093bda0 100644 --- a/host_vars/irc.adm.crans.org.yml +++ b/host_vars/irc.adm.crans.org.yml @@ -6,7 +6,7 @@ interfaces: loc_certbot: - dns_rfc2136_server: '172.16.10.147' dns_rfc2136_name: certbot_challenge. - dns_rfc2136_secret: "{{ vault_certbot_dns_secret }}" + dns_rfc2136_secret: "{{ vault.certbot_dns_secret }}" mail: root@crans.org certname: crans.org domains: "irc.crans.org" diff --git a/plays/nginx.yml b/plays/nginx.yml index f2895803..7cb58317 100755 --- a/plays/nginx.yml +++ b/plays/nginx.yml @@ -1,7 +1,7 @@ #!/usr/bin/env ansible-playbook --- # Deploy Nginx -- hosts: nginx +- hosts: nginx,!adh_server vars: nginx: '{{ glob_nginx | default({}) | combine(loc_nginx | default({})) }}' roles: diff --git a/roles/thelounge/templates/config.js.j2 b/roles/thelounge/templates/config.js.j2 index 3dd10515..87ce22da 100644 --- a/roles/thelounge/templates/config.js.j2 +++ b/roles/thelounge/templates/config.js.j2 @@ -392,7 +392,7 @@ module.exports = { // - `enable`: when set to `false`, LDAP support is disabled and all other // values are ignored. enable: {{ thelounge.ldap_enable }}, - +{% if thelounge.ldap_enable == "true" %} // - `url`: A url of the form `ldaps://:`. // For plain connections, use the `ldap` scheme. url: "{{ thelounge.ldap.url }}", @@ -442,6 +442,7 @@ module.exports = { // - `scope`: LDAP search scope. It is set to `"sub"` by default. scope: "{{ thelounge.ldap.scope }}", }, +{% endif %} }, // ## Debugging settings