Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a wait stmt to allow user to wait for Zookeeper to be active, before starting broker #94

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions roles/amq_streams_broker/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ amq_streams_broker_instance_count: "{{ groups[amq_streams_broker_inventory_group

amq_streams_deployment_balance_check_enabled: true

amq_streams_broker_zookeeper_host_default_value: localhost
amq_streams_broker_zookeeper_host_default_value: "{{ groups['zookeepers'][0] | default('localhost') }}"
amq_streams_broker_zookeeper_port_default_value: 2181
amq_streams_broker_zookeeper_wait: True
amq_streams_broker_zookeeper_wait: False

# Broker-Zookeeper Authentication with SASL
amq_streams_zookeeper_auth_enabled: false
Expand Down
5 changes: 2 additions & 3 deletions roles/amq_streams_broker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,14 @@
when:
- amq_streams_zookeeper_auth_enabled is defined and amq_streams_zookeeper_auth_enabled

- name: "Wait for Zookeeper to be available - if host and port are provided."
- name: "Wait for Zookeeper to be available - if enabled ({{ amq_streams_broker_zookeeper_host }}:{{ amq_streams_broker_zookeeper_port }})."
ansible.builtin.wait_for:
host: "{{ amq_streams_broker_zookeeper_host }}"
port: "{{ amq_streams_broker_zookeeper_port }}"
when:
- 0 > 1 # Disabled until find a way to test the Zookeeper cluster connection (including all the zknodes)
- amq_streams_broker_zookeeper_wait is defined and amq_streams_broker_zookeeper_wait
- amq_streams_broker_zookeeper_host is defined
- amq_streams_broker_zookeeper_port is defined
- amq_streams_broker_zookeeper_wait is defined and amq_streams_broker_zookeeper_wait

- name: "Copy Server Keystore with certificates"
ansible.builtin.copy:
Expand Down
Loading