From 80a27caae42499727e26fdac09a1acdff9a89ae2 Mon Sep 17 00:00:00 2001 From: Alexander Meindl Date: Sat, 9 Nov 2024 14:30:39 +0100 Subject: [PATCH] new path for themes with redmine6 --- roles/redmine/defaults/main.yml | 2 -- roles/redmine/tasks/account_instance.yml | 16 ++++++++++++++++ roles/redmine/tasks/set_instance_vars.yml | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/roles/redmine/defaults/main.yml b/roles/redmine/defaults/main.yml index b4b9ca6..36ed0d9 100644 --- a/roles/redmine/defaults/main.yml +++ b/roles/redmine/defaults/main.yml @@ -280,8 +280,6 @@ redmine_write_permission_dirs: - path: /db - path: /tmp - path: /log - - path: /public/plugin_assets - - path: /public/assets # for additional_tags hint file - path: /plugins diff --git a/roles/redmine/tasks/account_instance.yml b/roles/redmine/tasks/account_instance.yml index bf55d87..c3b258b 100644 --- a/roles/redmine/tasks/account_instance.yml +++ b/roles/redmine/tasks/account_instance.yml @@ -105,6 +105,22 @@ recurse: '{{ item.recurse | default(False) }}' loop: '{{ redmine_write_permission_dirs }}' +- name: Set writable permission for assets with Redmine < 6 + ansible.builtin.file: + path: '{{ redmine_app_dir }}/public/plugin_assets' + owner: root + group: '{{ redmine_group }}' + mode: '0775' + when: active_redmine_repo_version != '6.0-stable' + +- name: Set writable permission for assets with Redmine = 6 + ansible.builtin.file: + path: '{{ redmine_app_dir }}/public/assets' + owner: root + group: '{{ redmine_group }}' + mode: '0775' + when: active_redmine_repo_version == '6.0-stable' + - name: Include redmine patch tasks ansible.builtin.include_tasks: account_redmine_patch.yml loop: "{{ active_redmine_patches }}" diff --git a/roles/redmine/tasks/set_instance_vars.yml b/roles/redmine/tasks/set_instance_vars.yml index accb820..197bc10 100644 --- a/roles/redmine/tasks/set_instance_vars.yml +++ b/roles/redmine/tasks/set_instance_vars.yml @@ -48,7 +48,7 @@ redmine_config_dir: "{{ redmine_global_config_dir }}/{{ instance_name }}" redmine_plugin_dir: "{{ redmine_app_dir }}/plugins" redmine_plugin_assets_dir: "{{ redmine_app_dir }}/public/plugin_assets" - redmine_theme_dir: "{{ redmine_app_dir }}/public/themes" + redmine_theme_dir: "{{ redmine_app_dir }}{{ '/themes' if active_redmine_repo_version == '6.0-stable' else '/public/themes' }}" puma_service_name: puma-{{ instance_name }} active_db_adapter: "{{ instance.adapter | default(redmine_db_adapter) }}" active_mysql_socket: "{{ instance.mysql_socket | default(redmine_mysql_socket) }}"