diff --git a/roles/web-app-nextcloud/tasks/config.yml b/roles/web-app-nextcloud/tasks/01_config.yml similarity index 100% rename from roles/web-app-nextcloud/tasks/config.yml rename to roles/web-app-nextcloud/tasks/01_config.yml diff --git a/roles/web-app-nextcloud/tasks/plugin.yml b/roles/web-app-nextcloud/tasks/02_plugin.yml similarity index 100% rename from roles/web-app-nextcloud/tasks/plugin.yml rename to roles/web-app-nextcloud/tasks/02_plugin.yml diff --git a/roles/web-app-nextcloud/tasks/system.yml b/roles/web-app-nextcloud/tasks/03_system.yml similarity index 100% rename from roles/web-app-nextcloud/tasks/system.yml rename to roles/web-app-nextcloud/tasks/03_system.yml diff --git a/roles/web-app-nextcloud/tasks/main.yml b/roles/web-app-nextcloud/tasks/main.yml index a9ab1759..fa05b79e 100644 --- a/roles/web-app-nextcloud/tasks/main.yml +++ b/roles/web-app-nextcloud/tasks/main.yml @@ -35,14 +35,14 @@ dest: "{{docker_compose.directories.volumes}}nginx.conf" notify: restart nextcloud nginx service +- name: Setup config.php + include_tasks: 01_config.yml + - name: Flush all handlers immediately so that occ can be used meta: flush_handlers -- name: Setup config.php - include_tasks: config.yml - - name: Setup Nextcloud Plugins - include_tasks: plugin.yml + include_tasks: 02_plugin.yml loop: "{{applications | get_app_conf(application_id, 'plugins', True) | dict2items }}" loop_control: loop_var: plugin_item @@ -51,7 +51,7 @@ plugin_value: "{{ plugin_item.value }}" - name: Load system configuration - include_tasks: system.yml + include_tasks: 03_system.yml - name: Add missing database indices in Nextcloud command: > diff --git a/roles/web-app-nextcloud/templates/config/database.config.php.j2 b/roles/web-app-nextcloud/templates/config/database.config.php.j2 new file mode 100644 index 00000000..a3896f52 --- /dev/null +++ b/roles/web-app-nextcloud/templates/config/database.config.php.j2 @@ -0,0 +1,7 @@ + '{{ database_host }}:{{ database_port }}', + 'dbname' => '{{ database_name }}', + 'dbuser' => '{{ database_username }}', + 'dbpassword' => '{{ database_password }}', +]; diff --git a/roles/web-app-nextcloud/vars/plugins/user_ldap.yml b/roles/web-app-nextcloud/vars/plugins/user_ldap.yml index d0269e35..e94e8ba4 100644 --- a/roles/web-app-nextcloud/vars/plugins/user_ldap.yml +++ b/roles/web-app-nextcloud/vars/plugins/user_ldap.yml @@ -164,7 +164,7 @@ plugin_configuration: appid: "user_ldap" configkey: "s01ldap_userlist_filter" configvalue: |- - {% if applications | get_app_conf(application_id, 'plugins', True).user_ldap.user_directory.enabled %} + {% if applications | get_app_conf(application_id, 'plugins.user_ldap.user_directory.enabled', True) %} {{ ldap.filters.users.all }} {% else %} ()