diff --git a/tasks/main.yml b/tasks/main.yml index 2a479120..32a66d3c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -63,7 +63,6 @@ _oslomsg_notify_password: "{{ glance_oslomsg_notify_password }}" _oslomsg_notify_vhost: "{{ glance_oslomsg_notify_vhost }}" _oslomsg_notify_transport: "{{ glance_oslomsg_notify_transport }}" - _oslomsg_configure_notify: "{{ glance_ceilometer_enabled | bool }}" tags: - common-mq - glance-config diff --git a/templates/glance-api.conf.j2 b/templates/glance-api.conf.j2 index c14b1e9d..197ea1bd 100644 --- a/templates/glance-api.conf.j2 +++ b/templates/glance-api.conf.j2 @@ -70,11 +70,9 @@ ssl = {{ glance_oslomsg_notify_use_ssl | bool }} rabbit_notification_exchange = glance rabbit_notification_topic = notifications -{% if glance_ceilometer_enabled %} [oslo_messaging_notifications] -driver = messagingv2 +driver = {% if glance_ceilometer_enabled %}messagingv2{% else %}noop{% endif %} transport_url = {{ glance_oslomsg_notify_transport }}://{% for host in glance_oslomsg_notify_servers.split(',') %}{{ glance_oslomsg_notify_userid }}:{{ glance_oslomsg_notify_password }}@{{ host }}:{{ glance_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ glance_oslomsg_notify_vhost }}{% if glance_oslomsg_notify_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} -{% endif %} [paste_deploy] flavor = {{ glance_flavor }} diff --git a/templates/glance-registry.conf.j2 b/templates/glance-registry.conf.j2 index d6d2287f..33887fc1 100644 --- a/templates/glance-registry.conf.j2 +++ b/templates/glance-registry.conf.j2 @@ -47,11 +47,9 @@ ssl = {{ glance_oslomsg_notify_use_ssl | bool }} rabbit_notification_exchange = glance rabbit_notification_topic = notifications -{% if glance_ceilometer_enabled %} [oslo_messaging_notifications] -driver = messagingv2 +driver = {% if glance_ceilometer_enabled %}messagingv2{% else %}noop{% endif %} transport_url = {{ glance_oslomsg_notify_transport }}://{% for host in glance_oslomsg_notify_servers.split(',') %}{{ glance_oslomsg_notify_userid }}:{{ glance_oslomsg_notify_password }}@{{ host }}:{{ glance_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ glance_oslomsg_notify_vhost }}{% if glance_oslomsg_notify_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} -{% endif %} [oslo_policy] policy_file = {{ glance_policy_file }}