diff --git a/defaults/main.yml b/defaults/main.yml index 7c58e14..7e1e972 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -200,6 +200,7 @@ trove_guest_endpoint_type: public # Guestagent RPC configuration trove_guest_rpc_host_group: "{{ oslomsg_rpc_host_group | default('rabbitmq_all') }}" +trove_guest_oslomsg_rpc_setup_host: "{{ (trove_guest_rpc_host_group in groups) | ternary(groups[trove_guest_rpc_host_group][0], 'localhost') }}" trove_guest_oslomsg_rpc_servers:>- {{ groups[trove_guest_rpc_host_group] | map('extract', hostvars, 'ansible_facts') | map(attribute=trove_provider_net_iface | replace('-','_') diff --git a/releasenotes/notes/trove_rabbitmq_guest_setup_host-b1237ed5efe32431.yaml b/releasenotes/notes/trove_rabbitmq_guest_setup_host-b1237ed5efe32431.yaml new file mode 100644 index 0000000..895081d --- /dev/null +++ b/releasenotes/notes/trove_rabbitmq_guest_setup_host-b1237ed5efe32431.yaml @@ -0,0 +1,14 @@ +--- +upgrade: + - | + When using standalone RabbitMQ cluster for Trove deployment, make sure to + use ``trove_guest_rpc_host_group`` as a pointer to host group, rather then + a pointer to a specific host. + You can use variable ``trove_guest_oslomsg_rpc_setup_host`` to define a + specific host which should be responsible for provisionment of RabbitMQ + vhost and users instead. +fixes: + - | + Variable ``trove_guest_rpc_host_group`` is now used as intended and + represents a host group. It is no longer directly used as + "delegated host" when configuring a standalone RabbitMQ cluster for Trove. diff --git a/tasks/main.yml b/tasks/main.yml index 787c18a..8616908 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -100,7 +100,7 @@ - (trove_oslomsg_rpc_host_group != trove_guest_rpc_host_group) or (trove_oslomsg_notify_host_group != trove_guest_notify_host_group and trove_guest_oslomsg_notify_configure) vars: - _oslomsg_rpc_setup_host: "{{ trove_guest_rpc_host_group }}" + _oslomsg_rpc_setup_host: "{{ trove_guest_oslomsg_rpc_setup_host }}" _oslomsg_rpc_userid: "{{ trove_guest_oslomsg_rpc_userid }}" _oslomsg_rpc_password: "{{ trove_guest_oslomsg_rpc_password }}" _oslomsg_rpc_vhost: "{{ trove_guest_oslomsg_rpc_vhost }}"