From 2f45038bef04ee488ce0cab1c4cc904fde2f6e3e Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Wed, 16 Jul 2025 23:01:25 +0200 Subject: [PATCH] Solved variable bugs --- group_vars/all/00_general.yml | 8 ++++---- roles/web-app-nextcloud/config/main.yml | 8 ++++---- tests/integration/group_vars/__init__.py | 0 3 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 tests/integration/group_vars/__init__.py diff --git a/group_vars/all/00_general.yml b/group_vars/all/00_general.yml index cadf901f..87b68bad 100644 --- a/group_vars/all/00_general.yml +++ b/group_vars/all/00_general.yml @@ -54,6 +54,9 @@ certbot_cert_path: "/etc/letsencrypt/live" # Path contain ## Docker Role Specific Parameters docker_restart_policy: "unless-stopped" +# default value if not set via CLI (-e) or in playbook vars +allowed_applications: [] + # helper _applications_nextcloud_oidc_flavor: >- {{ @@ -67,7 +70,4 @@ _applications_nextcloud_oidc_flavor: >- | get_app_conf('web-app-nextcloud','features.ldap',False) else 'sociallogin' ) - }} - -# default value if not set via CLI (-e) or in playbook vars -allowed_applications: [] + }} \ No newline at end of file diff --git a/roles/web-app-nextcloud/config/main.yml b/roles/web-app-nextcloud/config/main.yml index fe8b1d12..d50d651a 100644 --- a/roles/web-app-nextcloud/config/main.yml +++ b/roles/web-app-nextcloud/config/main.yml @@ -41,7 +41,7 @@ docker: # image: "nextcloud-collabora" # version: "latest" oidc: - enabled: "{{ defaults_applications | get_app_conf('web-app-nextcloud', 'features.oidc') }}" # Activate OIDC for Nextcloud + enabled: " {{ applications | get_app_conf('web-app-nextcloud', 'features.oidc', False, True) }}" # Activate OIDC for Nextcloud # floavor decides which OICD plugin should be used. # Available options: oidc_login, sociallogin # @see https://apps.nextcloud.com/apps/oidc_login @@ -236,13 +236,13 @@ plugins: # enabled: false twofactor_nextcloud_notification: # Nextcloud two-factor notification: sends notifications for two-factor authentication events (https://apps.nextcloud.com/apps/twofactor_nextcloud_notification) - enabled: "{{ not defaults_applications | get_app_conf('web-app-nextcloud', 'features.oidc', False, True) }}" # Deactivate 2FA if oidc is active + enabled: "{{ not applications | get_app_conf('web-app-nextcloud', 'features.oidc', False, True) }}" # Deactivate 2FA if oidc is active twofactor_totp: # Nextcloud two-factor TOTP: provides time-based one-time password authentication (https://apps.nextcloud.com/apps/twofactor_totp) - enabled: "{{ not defaults_applications | get_app_conf('web-app-nextcloud', 'features.oidc', False, True) }}" # Deactivate 2FA if oidc is active + enabled: "{{ not applications | get_app_conf('web-app-nextcloud', 'features.oidc', False, True) }}" # Deactivate 2FA if oidc is active user_ldap: # Nextcloud user LDAP: integrates LDAP for user management and authentication (https://apps.nextcloud.com/apps/user_ldap) - enabled: "{{ defaults_applications | get_app_conf('web-app-nextcloud', 'features.ldap', False, True) }}" + enabled: "{{ applications | get_app_conf('web-app-nextcloud', 'features.ldap', False, True) }}" user_directory: enabled: true # Enables the LDAP User Directory Search user_oidc: diff --git a/tests/integration/group_vars/__init__.py b/tests/integration/group_vars/__init__.py new file mode 100644 index 00000000..e69de29b