diff --git a/defaults/main.yml b/defaults/main.yml index 572b4f1b..9b01011f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -129,6 +129,7 @@ keystone_db_connection_recycle_time: "{{ openstack_db_connection_recycle_time | keystone_messaging_enabled: true # RPC +keystone_oslomsg_rpc_configure: False keystone_oslomsg_rpc_host_group: "{{ oslomsg_rpc_host_group | default('rabbitmq_all') }}" keystone_oslomsg_rpc_setup_host: "{{ (keystone_oslomsg_rpc_host_group in groups) | ternary(groups[keystone_oslomsg_rpc_host_group][0], 'localhost') }}" keystone_oslomsg_rpc_transport: "{{ oslomsg_rpc_transport | default('rabbit') }}" @@ -148,6 +149,7 @@ keystone_oslomsg_rpc_ssl_version: "{{ oslomsg_rpc_ssl_version | default('TLSv1_2 keystone_oslomsg_rpc_ssl_ca_file: "{{ oslomsg_rpc_ssl_ca_file | default('') }}" # Notify +keystone_oslomsg_notify_configure: "{{ oslomsg_notify_configure | default(keystone_ceilometer_enabled) }}" keystone_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}" keystone_oslomsg_notify_setup_host: >- {{ (keystone_oslomsg_notify_host_group in groups) | ternary(groups[keystone_oslomsg_notify_host_group][0], 'localhost') }} diff --git a/tasks/main.yml b/tasks/main.yml index 981e38bc..8452b414 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -103,12 +103,14 @@ when: - "_keystone_is_first_play_host" vars: + _oslomsg_rpc_configure: "{{ keystone_oslomsg_rpc_configure }}" _oslomsg_rpc_setup_host: "{{ keystone_oslomsg_rpc_setup_host }}" _oslomsg_rpc_userid: "{{ keystone_oslomsg_rpc_userid }}" _oslomsg_rpc_password: "{{ keystone_oslomsg_rpc_password }}" _oslomsg_rpc_vhost: "{{ keystone_oslomsg_rpc_vhost }}" _oslomsg_rpc_transport: "{{ keystone_oslomsg_rpc_transport }}" _oslomsg_rpc_policies: "{{ keystone_oslomsg_rpc_policies }}" + _oslomsg_notify_configure: "{{ keystone_oslomsg_notify_configure }}" _oslomsg_notify_setup_host: "{{ keystone_oslomsg_notify_setup_host }}" _oslomsg_notify_userid: "{{ keystone_oslomsg_notify_userid }}" _oslomsg_notify_password: "{{ keystone_oslomsg_notify_password }}" diff --git a/templates/keystone.conf.j2 b/templates/keystone.conf.j2 index 7978aa48..b9184933 100644 --- a/templates/keystone.conf.j2 +++ b/templates/keystone.conf.j2 @@ -23,6 +23,7 @@ notification_opt_out = {{ opt_out }} {% endif %} {% endif %} +{% if keystone_oslomsg_rpc_configure %} ## Oslo.Messaging RPC transport_url = {{ keystone_oslomsg_rpc_transport }}://{% for host in keystone_oslomsg_rpc_servers.split(',') %}{{ keystone_oslomsg_rpc_userid }}:{{ keystone_oslomsg_rpc_password }}@{{ host }}:{{ keystone_oslomsg_rpc_port }}{% if not loop.last %},{% else %}/{{ _keystone_oslomsg_rpc_vhost_conf }}{% if keystone_oslomsg_rpc_use_ssl | bool %}?ssl=1&ssl_version={{ keystone_oslomsg_rpc_ssl_version }}&ssl_ca_file={{ keystone_oslomsg_rpc_ssl_ca_file }}{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} @@ -30,9 +31,10 @@ transport_url = {{ keystone_oslomsg_rpc_transport }}://{% for host in keystone_o rabbit_quorum_queue = {{ keystone_oslomsg_rabbit_quorum_queues }} rabbit_quorum_delivery_limit = {{ keystone_oslomsg_rabbit_quorum_delivery_limit }} rabbit_quorum_max_memory_bytes = {{ keystone_oslomsg_rabbit_quorum_max_memory_bytes }} +{% endif %} [oslo_messaging_notifications] -{% if keystone_ceilometer_enabled | bool %} +{% if keystone_oslomsg_notify_configure | bool %} driver = messagingv2 {% set notification_driver = true %} {% endif %}