Merge "Link plugin settings extension separately"

This commit is contained in:
Zuul 2024-10-02 14:48:00 +00:00 committed by Gerrit Code Review
commit aac5e4506a
3 changed files with 29 additions and 1 deletions

View File

@ -51,6 +51,21 @@
use_regex: yes use_regex: yes
register: found_panels register: found_panels
- name: Registering settings
find:
paths: |-
{% set dashboard_path = [] %}
{% for dashboard in found_dashboards.files %}
{% for path in _dashboard_settings_location %}
{% set _ = dashboard_path.append(dashboard.path + path) %}
{% endfor %}
{% endfor %}
{{ dashboard_path }}
patterns: ["^_[0-9]{2,4}_.*.py$"]
file_type: file
use_regex: yes
register: found_settings
- name: Registering default policy files - name: Registering default policy files
find: find:
paths: |- paths: |-
@ -99,6 +114,16 @@
notify: notify:
- Compile messages - Compile messages
- name: Enable project settings
file:
src: "{{ item.path }}"
path: "{{ horizon_dashboard_settings_dir }}/{{ item.path | basename }}"
state: link
with_items: "{{ found_settings.files }}"
notify:
- Compile messages
- Restart wsgi process
- name: Enable project panels - name: Enable project panels
file: file:
src: "{{ item.path }}" src: "{{ item.path }}"

View File

@ -39,6 +39,7 @@ _horizon_translations_pull:
module: trove_dashboard module: trove_dashboard
horizon_dashboard_panel_dir: "{{ horizon_lib_dir }}/openstack_dashboard/local/enabled" horizon_dashboard_panel_dir: "{{ horizon_lib_dir }}/openstack_dashboard/local/enabled"
horizon_dashboard_settings_dir: "{{ horizon_lib_dir }}/openstack_dashboard/local/local_settings.d"
horizon_manage: "{{ horizon_bin }}/horizon-manage.py" horizon_manage: "{{ horizon_bin }}/horizon-manage.py"
_horizon_uwsgi_ini_requirements: _horizon_uwsgi_ini_requirements:

View File

@ -27,6 +27,8 @@ _horizon_bin: "/openstack/venvs/horizon-{{ horizon_venv_tag }}/bin"
_dashboard_panels_location: _dashboard_panels_location:
- "/enabled" - "/enabled"
- "/conf" - "/conf"
- "/local_settings.d"
- "/local/enabled" - "/local/enabled"
_dashboard_settings_location:
- "/local_settings.d"
- "/local/local_settings.d" - "/local/local_settings.d"