Solved nextcloud plugin bugs in context ldap

This commit is contained in:
Kevin Veen-Birkenbach 2025-03-21 18:43:06 +01:00
parent c51f935eff
commit 0928245853
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E
4 changed files with 25 additions and 11 deletions

View File

@ -70,4 +70,4 @@ css_enabled_default: true # Enables\Disables Global CSS o
## iframe for primary domain
# Enables\Disables the possibility to be embedded via iframe by default.
# Enable conciously on every app in which it makes sense, due to that this a potential security risk
landingpage_iframe_enabled_default: false
landingpage_iframe_enabled_default: false

View File

@ -13,8 +13,8 @@ defaults_service_provider:
platform:
titel: "CyMaIS Plattform Demo"
subtitel: "Demo of the Cyber Master Infrastructur Solution Plattform"
logo: "{{applications.assets_server.url}}/logo.png"
favicon: "{{applications.assets_server.url}}/favicon.ico"
logo: "{{applications.assets_server.url}}/img/logo.png"
favicon: "{{applications.assets_server.url}}/img/favicon.ico"
contact:
bluesky: "{{ '@' ~ users.administrator.username ~ '.' ~ domains.bluesky_api if 'bluesky' in group_names else '' }}"
email: "contact@{{ primary_domain }}"

View File

@ -28,20 +28,33 @@
changed_when: enable_result.rc == 0 and ("already enabled" not in enable_result.stdout)
when: plugin_value.enabled | bool
- name: Check if {{nextcloud_localhost_plugin_configuration_directory}}{{ plugin_key }}.yml exists
- name: Check if {{nextcloud_control_node_plugin_vars_directory}}{{ plugin_key }}.yml exists
stat:
path: "{{nextcloud_localhost_plugin_configuration_directory}}{{ plugin_key }}.yml"
register: plugin_config_file
path: "{{nextcloud_control_node_plugin_vars_directory}}{{ plugin_key }}.yml"
delegate_to: localhost
become: false
register: plugin_vars_file
- name: Apply configuration to {{ plugin_key }}
block:
- name: Load {{ plugin_key }} configuration variables
include_vars:
file: "{{nextcloud_localhost_plugin_configuration_directory}}{{ plugin_key }}.yml"
file: "{{nextcloud_control_node_plugin_vars_directory}}{{ plugin_key }}.yml"
- name: "Set {{ item.configkey }} for {{ item.appid }}"
loop: "{{ plugin_configuration }}"
command: >
{{ nextcloud_docker_exec_occ }} config:app:set {{ item.appid }} {{ item.configkey }} --value '{{ item.configvalue | to_json if item.configvalue is mapping else item.configvalue }}'
when: plugin_config_file.stat.exists
when: plugin_vars_file.stat.exists
- name: Check if {{nextcloud_control_node_plugin_tasks_directory}}{{ plugin_key }}.yml exists
stat:
path: "{{nextcloud_control_node_plugin_tasks_directory}}{{ plugin_key }}.yml"
delegate_to: localhost
become: false
register: plugin_tasks_file
- name: "include {{nextcloud_control_node_plugin_tasks_directory}}{{ plugin_key }}.yml"
include_tasks: "{{nextcloud_control_node_plugin_tasks_directory}}{{ plugin_key }}.yml"
when: plugin_tasks_file.stat.exists

View File

@ -10,8 +10,9 @@ database_type: "mariadb"
domain: "{{domains[application_id]}}" # Public domain at which Nextcloud will be accessable
http_port: "{{ ports.localhost.http[application_id] }}" # Port at which nextcloud is reachable in the local network
# Localhost
nextcloud_localhost_plugin_configuration_directory: "{{role_path}}/vars/plugins/" # Folder in which the files for the plugin configuration are stored
# Control Node
nextcloud_control_node_plugin_vars_directory: "{{role_path}}/vars/plugins/" # Folder in which the files for the plugin configuration are stored
nextcloud_control_node_plugin_tasks_directory: "{{role_path}}/tasks/plugins/" # Folder which contains the files for extra plugin configuration tasks
# Host