Link plugin settings extension separately
At the moment Horizon plugins' local_settings are being symlinked to the enabled folder, which is not entirely correct. Today Horizon will produce a warning message during compression in case a settings file will be present in enabled folder, ie: WARNING:root:Skipping openstack_dashboard.local.enabled._1699_orchestration_settings because it doesn't have DASHBOARD, PANEL, PANEL_GROUP, or FEATURE defined. To avoid such warning settings files are being search and symlinked independently now. Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-openstack_hosts/+/930272 Change-Id: I5b50bad91f00cd4f5b5c36e30753e88425cf9d13
This commit is contained in:
parent
b0d9b99f70
commit
3288a587f9
@ -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 }}"
|
||||||
|
@ -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:
|
||||||
|
@ -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"
|
||||||
|
Loading…
Reference in New Issue
Block a user