From b35901c1ff17959af7979051c1d7e23c5880bed0 Mon Sep 17 00:00:00 2001 From: Eduardo Gonzalez Date: Tue, 14 Feb 2017 10:07:16 +0000 Subject: [PATCH] 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 --- ansible/roles/horizon/tasks/config.yml | 41 ++++++++----------- .../roles/horizon/templates/horizon.json.j2 | 21 +++++++--- 2 files changed, 33 insertions(+), 29 deletions(-) diff --git a/ansible/roles/horizon/tasks/config.yml b/ansible/roles/horizon/tasks/config.yml index e5f7f1cabc..d2622eea97 100644 --- a/ansible/roles/horizon/tasks/config.yml +++ b/ansible/roles/horizon/tasks/config.yml @@ -61,17 +61,26 @@ with_items: - { name: "ceilometer", enabled: "{{ enable_ceilometer }}" } - { name: "cinder", enabled: "{{ enable_cinder }}" } - - { name: "cloudkitty", enabled: "{{ enable_cloudkitty }}" } + - { name: "cloudkitty", enabled: "{{ enable_horizon_cloudkitty }}" } + - { name: "freezer", enabled: "{{ enable_horizon_freezer }}" } - { name: "glance", enabled: "{{ enable_glance }}" } - { name: "heat", enabled: "{{ enable_heat }}" } - - { name: "ironic", enabled: "{{ enable_ironic }}" } + - { name: "ironic", enabled: "{{ enable_horizon_ironic }}" } - { name: "keystone", enabled: "{{ enable_keystone }}" } - - { name: "manila", enabled: "{{ enable_manila }}" } + - { name: "karbor", enabled: "{{ enable_horizon_karbor }}" } + - { name: "magnum", enabled: "{{ enable_horizon_magnum }}" } + - { name: "manila", enabled: "{{ enable_horizon_manila }}" } + - { name: "mistral", enabled: "{{ enable_horizon_mistral }}" } + - { name: "murano", enabled: "{{ enable_horizon_murano }}" } - { name: "neutron", enabled: "{{ enable_neutron }}" } - { name: "nova", enabled: "{{ enable_nova }}" } - - { name: "sahara", enabled: "{{ enable_sahara }}" } - - { name: "senlin", enabled: "{{ enable_senlin }}" } - - { name: "trove", enabled: "{{ enable_trove }}" } + - { name: "sahara", enabled: "{{ enable_horizon_sahara }}" } + - { name: "searchlight", enabled: "{{ enable_horizon_searchlight }}" } + - { name: "senlin", enabled: "{{ enable_horizon_senlin }}" } + - { name: "solum", enabled: "{{ enable_horizon_solum }}" } + - { name: "tacker", enabled: "{{ enable_horizon_tacker }}" } + - { name: "trove", enabled: "{{ enable_horizon_trove }}" } + - { name: "watcher", enabled: "{{ enable_horizon_watcher }}" } - name: Copying over existing policy.json vars: @@ -83,23 +92,9 @@ when: - horizon.enabled | bool - inventory_hostname in groups[horizon.group] - - item[0]['enabled'] | bool - - item[1]['stat']['exists'] - with_together: - - [{ name: "ceilometer", enabled: "{{ enable_ceilometer }}" }, - { name: "cinder", enabled: "{{ enable_cinder }}" }, - { name: "cloudkitty", enabled: "{{ enable_cloudkitty }}" }, - { name: "glance", enabled: "{{ enable_glance }}" }, - { name: "heat", enabled: "{{ enable_heat }}" }, - { name: "ironic", enabled: "{{ enable_ironic }}" }, - { name: "keystone", enabled: "{{ enable_keystone }}" }, - { name: "manila", enabled: "{{ enable_manila }}" }, - { name: "neutron", enabled: "{{ enable_neutron }}" }, - { name: "nova", enabled: "{{ enable_nova }}" }, - { name: "sahara", enabled: "{{ enable_sahara }}" }, - { name: "senlin", enabled: "{{ enable_senlin }}" }, - { name: "trove", enabled: "{{ enable_trove }}" }] - - "{{ custom_policy.results }}" + - item.item.enabled | bool + - item.stat.exists + with_items: "{{ custom_policy.results }}" - name: Check horizon container vars: diff --git a/ansible/roles/horizon/templates/horizon.json.j2 b/ansible/roles/horizon/templates/horizon.json.j2 index 9cdf717b6a..95e2fca2f7 100644 --- a/ansible/roles/horizon/templates/horizon.json.j2 +++ b/ansible/roles/horizon/templates/horizon.json.j2 @@ -4,17 +4,26 @@ {% set services = [ ( 'ceilometer', enable_ceilometer ), ( 'cinder', enable_cinder ), - ( 'cloudkitty', enable_cloudkitty ), + ( 'cloudkitty', enable_horizon_cloudkitty ), + ( 'freezer', enable_horizon_freezer ), ( 'glance', enable_glance ), ( 'heat', enable_heat ), - ( 'ironic', enable_ironic ), + ( 'ironic', enable_horizon_ironic ), ( 'keystone', enable_keystone ), - ( 'manila', enable_manila ), + ( '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_sahara ), - ( 'senlin', enable_senlin ), - ( 'trove', enable_trove ) + ( '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 ) ] %} {