Not creating cluster by default from 3 nodes
patsevanton opened this issue · 1 comments
patsevanton commented
Hello! Thanks for ansible-consul!
cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.8 (Maipo)
Inventory:
[consul_instances]
consul1.consul consul_node_role=bootstrap ansible_host=192.168.22.3
consul2.consul consul_node_role=server ansible_host=192.168.22.4
consul3.consul consul_node_role=server ansible_host=192.168.22.5
Playbook
---
- name: Install consul cluster
become: yes
hosts: consul_instances
roles:
- role: ansible-consul-2.5.4
Output
https://gist.github.com/patsevanton/c044c05f27a9f3a29e7e690a3c1415ec
consul members
Node Address Status Type Build Protocol DC Segment
rhel-78-16g 192.168.22.3:8301 alive server 1.6.3 2 dc1 <all>
consul members
Node Address Status Type Build Protocol DC Segment
rhel-78-16g 192.168.22.4:8301 alive server 1.6.3 2 dc1 <all>
How
patsevanton commented
work inventroy with same hostname
[consul_instances]
consul1.consul consul_node_name=ggg consul_node_role=bootstrap ansible_host=zzz
consul2.consul consul_node_name=hhhh consul_node_role=server ansible_host=xxx
consul3.consul consul_node_name=jjj consul_node_role=server ansible_host=yyyy