diff --git a/ansible/roles/barbican/defaults/main.yml b/ansible/roles/barbican/defaults/main.yml index c09cac06ab..f0d846c9f6 100644 --- a/ansible/roles/barbican/defaults/main.yml +++ b/ansible/roles/barbican/defaults/main.yml @@ -145,6 +145,15 @@ barbican_ks_roles: - "{{ barbican_observer_role }}" - "{{ barbican_audit_role }}" +#################### +# Notification +#################### +barbican_notification_topics: + - name: notifications + enabled: "{{ enable_ceilometer | bool or enable_searchlight | bool }}" + +barbican_enabled_notification_topics: "{{ barbican_notification_topics | selectattr('enabled', 'equalto', true) | list }}" + #################### # TLS #################### diff --git a/ansible/roles/barbican/templates/barbican.conf.j2 b/ansible/roles/barbican/templates/barbican.conf.j2 index 89036675b0..c207318709 100644 --- a/ansible/roles/barbican/templates/barbican.conf.j2 +++ b/ansible/roles/barbican/templates/barbican.conf.j2 @@ -67,6 +67,12 @@ memcached_servers = {% for host in groups['memcached'] %}{{ 'api' | kolla_addres [oslo_messaging_notifications] transport_url = {{ notify_transport_url }} +{% if barbican_enabled_notification_topics %} +driver = messagingv2 +topics = {{ barbican_enabled_notification_topics | map(attribute='name') | join(',') }} +{% else %} +driver = noop +{% endif %} [oslo_middleware] enable_proxy_headers_parsing = True