diff --git a/ansible/roles/aodh/defaults/main.yml b/ansible/roles/aodh/defaults/main.yml index 20b91959d18ac0711240cc25afc7f3957a053d3e..c23bfe3d07f4e435368da069dd322c258402d4ce 100644 --- a/ansible/roles/aodh/defaults/main.yml +++ b/ansible/roles/aodh/defaults/main.yml @@ -75,6 +75,17 @@ aodh_database_name: "aodh" aodh_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}aodh{% endif %}" aodh_database_address: "{{ database_address }}:{{ database_port }}" +#################### +# Notification +#################### +aodh_notification_topics: + - name: notifications + enabled: "{{ enable_ceilometer | bool }}" + - name: vitrage_notifications + enabled: "{{ enable_vitrage | bool }}" + +aodh_enabled_notification_topics: "{{ aodh_notification_topics | selectattr('enabled', 'equalto', true) | list }}" + #################### # Docker #################### diff --git a/ansible/roles/aodh/templates/aodh.conf.j2 b/ansible/roles/aodh/templates/aodh.conf.j2 index 42bcf74b2f445f19bccd36fe62b202556b8ea4c9..45edf4beb3cbfa3818234098a86631ee96b76ae6 100644 --- a/ansible/roles/aodh/templates/aodh.conf.j2 +++ b/ansible/roles/aodh/templates/aodh.conf.j2 @@ -47,8 +47,10 @@ interface = internal [oslo_messaging_notifications] transport_url = {{ notify_transport_url }} -{% if enable_ceilometer | bool %} +{% if aodh_enabled_notification_topics %} driver = messagingv2 -topics = notifications +topics = {{ aodh_enabled_notification_topics | map(attribute='name') | join(',') }} +{% else %} +driver = noop {% endif %} diff --git a/ansible/roles/cinder/defaults/main.yml b/ansible/roles/cinder/defaults/main.yml index ca7433d0e7737d0978e61e42dc4fa6001704786b..7071bdf43355e7265394e9fad7e5ee83796bfe3c 100644 --- a/ansible/roles/cinder/defaults/main.yml +++ b/ansible/roles/cinder/defaults/main.yml @@ -193,6 +193,17 @@ cinder_backends: cinder_enabled_backends: "{{ cinder_backends|selectattr('enabled', 'equalto', true)|list }}" +#################### +# Notification +#################### +cinder_notification_topics: + - name: notifications + enabled: "{{ enable_ceilometer | bool }}" + - name: vitrage_notifications + enabled: "{{ enable_vitrage | bool }}" + +cinder_enabled_notification_topics: "{{ cinder_notification_topics | selectattr('enabled', 'equalto', true) | list }}" + ############################################# # Hitachi NAS Platform iSCSI and NFS drivers ############################################# diff --git a/ansible/roles/cinder/templates/cinder.conf.j2 b/ansible/roles/cinder/templates/cinder.conf.j2 index 225e1585e5c401a6086512c47656c36f4d0ac73d..11a5dbf3e259eb47841560280de895c1bdde5d22 100644 --- a/ansible/roles/cinder/templates/cinder.conf.j2 +++ b/ansible/roles/cinder/templates/cinder.conf.j2 @@ -61,9 +61,9 @@ transport_url = {{ rpc_transport_url }} [oslo_messaging_notifications] transport_url = {{ notify_transport_url }} -{% if enable_ceilometer | bool or enable_searchlight | bool %} +{% if cinder_enabled_notification_topics %} driver = messagingv2 -topics = notifications +topics = {{ cinder_enabled_notification_topics | map(attribute='name') | join(',') }} {% else %} driver = noop {% endif %} diff --git a/ansible/roles/neutron/defaults/main.yml b/ansible/roles/neutron/defaults/main.yml index 1af74f0ecd7632a5df5c15a1659c345879763538..cbb9f6a64b170b2968c1b2a8e58e8591de980dbb 100644 --- a/ansible/roles/neutron/defaults/main.yml +++ b/ansible/roles/neutron/defaults/main.yml @@ -377,6 +377,8 @@ neutron_notification_topics: enabled: "{{ enable_ceilometer | bool or enable_searchlight | bool or enable_neutron_infoblox_ipam_agent | bool }}" - name: notifications_designate enabled: "{{ enable_designate | bool }}" + - name: vitrage_notifications + enabled: "{{ enable_vitrage | bool }}" neutron_enabled_notification_topics: "{{ neutron_notification_topics | selectattr('enabled', 'equalto', true) | list }}" diff --git a/ansible/roles/nova/defaults/main.yml b/ansible/roles/nova/defaults/main.yml index 76fcd918d4d95f87802e4016f2c92b7be05a147c..b6c0c1aeff5c2d67dbffcc976d9de424a93239a5 100644 --- a/ansible/roles/nova/defaults/main.yml +++ b/ansible/roles/nova/defaults/main.yml @@ -386,6 +386,8 @@ nova_notification_topics: enabled: "{{ enable_ceilometer | bool or enable_searchlight | bool or enable_neutron_infoblox_ipam_agent | bool }}" - name: notifications_designate enabled: "{{ enable_designate | bool }}" + - name: vitrage_notifications + enabled: "{{ enable_vitrage | bool }}" nova_enabled_notification_topics: "{{ nova_notification_topics | selectattr('enabled', 'equalto', true) | list }}"