Use template include for rabbitmq configuration
This commit is contained in:
parent
3d0a300097
commit
b8ab2f81d5
@ -18,22 +18,14 @@ volumes_dir = /var/lib/cinder/volumes
|
||||
{% if database_host -%}
|
||||
sql_connection = mysql://{{ database_user }}:{{ database_password }}@{{ database_host }}/{{ database }}
|
||||
{% endif -%}
|
||||
|
||||
{% include "parts/rabbitmq" %}
|
||||
|
||||
{% if rabbitmq_host or rabbitmq_hosts -%}
|
||||
notification_driver = cinder.openstack.common.notifier.rabbit_notifier
|
||||
control_exchange = cinder
|
||||
rabbit_userid = {{ rabbitmq_user }}
|
||||
rabbit_password = {{ rabbitmq_password }}
|
||||
rabbit_virtual_host = {{ rabbitmq_virtual_host }}
|
||||
{% if rabbitmq_hosts -%}
|
||||
rabbit_hosts = {{ rabbitmq_hosts }}
|
||||
{% if rabbitmq_ha_queues -%}
|
||||
rabbit_ha_queues = true
|
||||
rabbit_durable_queues = false
|
||||
{% endif %}
|
||||
{% else %}
|
||||
rabbit_host = {{ rabbitmq_host }}
|
||||
{% endif -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if volume_driver -%}
|
||||
volume_driver = {{ volume_driver }}
|
||||
{% endif -%}
|
||||
|
@ -16,28 +16,11 @@ state_path = /var/lib/cinder
|
||||
lock_path = /var/lock/cinder
|
||||
volumes_dir = /var/lib/cinder/volumes
|
||||
|
||||
{% include "parts/rabbitmq" %}
|
||||
|
||||
{% if rabbitmq_host or rabbitmq_hosts -%}
|
||||
notification_driver = cinder.openstack.common.notifier.rpc_notifier
|
||||
control_exchange = cinder
|
||||
{% if rabbit_ssl_port %}
|
||||
rabbit_use_ssl=True
|
||||
rabbit_port={{ rabbit_ssl_port }}
|
||||
{% if rabbit_ssl_ca %}
|
||||
kombu_ssl_ca_certs={{rabbit_ssl_ca}}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
rabbit_userid = {{ rabbitmq_user }}
|
||||
rabbit_password = {{ rabbitmq_password }}
|
||||
rabbit_virtual_host = {{ rabbitmq_virtual_host }}
|
||||
{% if rabbitmq_hosts -%}
|
||||
rabbit_hosts = {{ rabbitmq_hosts }}
|
||||
{% if rabbitmq_ha_queues -%}
|
||||
rabbit_ha_queues = true
|
||||
rabbit_durable_queues = false
|
||||
{% endif %}
|
||||
{% else %}
|
||||
rabbit_host = {{ rabbitmq_host }}
|
||||
{% endif -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if volume_driver -%}
|
||||
|
21
templates/parts/rabbitmq
Normal file
21
templates/parts/rabbitmq
Normal file
@ -0,0 +1,21 @@
|
||||
{% if rabbitmq_host or rabbitmq_hosts -%}
|
||||
rabbit_userid = {{ rabbitmq_user }}
|
||||
rabbit_virtual_host = {{ rabbitmq_virtual_host }}
|
||||
rabbit_password = {{ rabbitmq_password }}
|
||||
{% if rabbitmq_hosts -%}
|
||||
rabbit_hosts = {{ rabbitmq_hosts }}
|
||||
{% if rabbitmq_ha_queues -%}
|
||||
rabbit_ha_queues = True
|
||||
rabbit_durable_queues = False
|
||||
{% endif -%}
|
||||
{% else -%}
|
||||
rabbit_host = {{ rabbitmq_host }}
|
||||
{% endif -%}
|
||||
{% if rabbit_ssl_port -%}
|
||||
rabbit_use_ssl = True
|
||||
rabbit_port = {{ rabbit_ssl_port }}
|
||||
{% if rabbit_ssl_ca -%}
|
||||
kombu_ssl_ca_certs = {{ rabbit_ssl_ca }}
|
||||
{% endif -%}
|
||||
{% endif -%}
|
||||
{% endif -%}
|
Loading…
Reference in New Issue
Block a user