From ae86cb3d13bd3c3a4da4b673797d63c19bd47530 Mon Sep 17 00:00:00 2001 From: Djebran Lezzoum Date: Wed, 2 Oct 2024 15:36:00 +0200 Subject: [PATCH] Skip django_auth_ldap import if missing (#1955) --- roles/installer/templates/configmaps/config.yaml.j2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/installer/templates/configmaps/config.yaml.j2 b/roles/installer/templates/configmaps/config.yaml.j2 index 00893ddb..99acf723 100644 --- a/roles/installer/templates/configmaps/config.yaml.j2 +++ b/roles/installer/templates/configmaps/config.yaml.j2 @@ -15,7 +15,11 @@ data: import os import socket # Import all so that extra_settings works properly - from django_auth_ldap.config import * + try: + # Some AWX setups may have no django_auth_ldap dependency. + from django_auth_ldap.config import * + except: + pass def get_secret(): if os.path.exists("/etc/tower/SECRET_KEY"):