kolla-ansible/ansible/roles/horizon/templates/horizon.json.j2
Eduardo Gonzalez b35901c1ff Add missing dashboard policies
New dashboard plugins are included in horizon,
new custom policies support need to be added for
those services.

Change conditional check to apply changes when
horizon plugin is enabled, not the service itself.

Closes-Bug: #1664505
Change-Id: I67fcb88fd432b4c7554ddf24e76b28c3aab7c01f
2017-02-22 11:49:46 +00:00

55 lines
2.0 KiB
Django/Jinja

{% set apache_cmd = 'apache2' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd' %}
{% set apache_dir = 'apache2/conf-enabled' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd/conf.d' %}
{% set apache_file = '000-default.conf' if kolla_base_distro in ['ubuntu', 'debian'] else 'horizon.conf' %}
{% set services = [
( 'ceilometer', enable_ceilometer ),
( 'cinder', enable_cinder ),
( 'cloudkitty', enable_horizon_cloudkitty ),
( 'freezer', enable_horizon_freezer ),
( 'glance', enable_glance ),
( 'heat', enable_heat ),
( 'ironic', enable_horizon_ironic ),
( 'keystone', enable_keystone ),
( 'karbor', enable_horizon_karbor ),
( 'magnum', enable_horizon_magnum ),
( 'manila', enable_horizon_manila ),
( 'mistral', enable_horizon_mistral ),
( 'murano', enable_horizon_murano ),
( 'neutron', enable_neutron ),
( 'nova', enable_nova ),
( 'sahara', enable_horizon_sahara ),
( 'searchlight', enable_horizon_searchlight ),
( 'senlin', enable_horizon_senlin ),
( 'solum', enable_horizon_solum ),
( 'tacker', enable_horizon_tacker ),
( 'trove', enable_horizon_trove ),
( 'watcher', enable_horizon_watcher )
] %}
{
"command": "/usr/sbin/{{ apache_cmd }} -DFOREGROUND",
"config_files": [
{
"source": "{{ container_config_directory }}/horizon.conf",
"dest": "/etc/{{ apache_dir }}/{{ apache_file }}",
"owner": "horizon",
"perm": "0644"
},
{% for service, enabled in services if enabled | bool %}
{
"source": "{{ container_config_directory }}/horizon/{{ service }}_policy.json",
"dest": "/etc/openstack-dashboard/{{ service }}_policy.json",
"owner": "horizon",
"perm": "0600",
"optional": true
},
{% endfor %}
{
"source": "{{ container_config_directory }}/local_settings",
"dest": "/etc/openstack-dashboard/local_settings",
"owner": "horizon",
"perm": "0644"
}
]
}