-
Notifications
You must be signed in to change notification settings - Fork 19
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
cluster mode prompt"The error was: \"hostvars['rabbitmq-master']\" is undefined" #30
Comments
|
The same configuration didn't work either.
inventory:
playbook:
|
Answered too fast.
|
It's not that I'm too quick to answer, it's that I've spent 3 days on this question and and tried other ways. Does rabbitmq_slave_of point to the master hostname or the slave hostname. Or whether other parameters need to be specified? Inventory:
|
Do the hosts specified in the rabbitmq configuration could be resolved ? |
Yes, can resolved. In the playbook I did not find the operation of the node joining the cluster.
|
Without a reproducible case, without logs, hard to say what the matter is. Regards, |
Hi, I tried a few more times and it still doesn't work. Minimal configuration
---
- hosts: rabbitmq_master
gather_facts: yes
roles:
- role: rockandska.erlang
vars:
erlang_series: 23
erlang_series_rpm_version: 23.3.4.11-1.el7
- role: rockandska.rabbitmq
vars:
rabbitmq_is_master: true
rabbitmq_series: 3.8
rabbitmq_series_rpm_version: 3.8.30
tags:
- rabbitmq-master
- hosts: rabbitmq_slave
gather_facts: yes
roles:
- role: rockandska.erlang
vars:
erlang_series: 23
erlang_series_rpm_version: 23.3.4.11-1.el7
- role: rockandska.rabbitmq
vars:
rabbitmq_slave_of: mysql
rabbitmq_series: 3.8
rabbitmq_series_rpm_version: 3.8.30
tags:
- rabbitmq-slave
|
Resolved.
And add a task config_cluster.yml
|
There is no need for extra tasks for the cluster to being functional as the nodes join the cluster automatically on first start as describded in the rabbitmq documentation. |
Yes, you are right. |
There's indeed a "bug" here because the config is not copied if no sysctl config exists but cluster mode is activated and need to fix this. (#31 created for this) Thanks for pointing it out |
ansible: 2.12.6
error info:
inventory hosts:
playbook:
The text was updated successfully, but these errors were encountered: