andrewrothstein / ansible-consul_cluster

MIT License
7 stars 7 forks source link

What is the purpose of consul_agent_group_name in defaults/main.yml? #6

Open marcindulak opened 6 years ago

marcindulak commented 6 years ago

https://github.com/andrewrothstein/ansible-consul-cluster/blob/9b61bbf02b001b22fad2dc9638eecdd55233f3a7/defaults/main.yml#L2

andrewrothstein commented 6 years ago

the name of the Ansible group denoting the collection of alls hosts participating as either agents or servers in the Consul network. consul_agent_server_group_name denotes those hosts that are voting members in the Consul consensus. These two role vars are a convenient degree of freedom when you're managing multiple Consul clusters within a single large inventory.

marcindulak commented 6 years ago

This variable is set on the role level and not uses in tasks. What would be a use case?

andrewrothstein commented 6 years ago

It's set at the role level. It's referenced in the vars which are referenced in the tasks as well as the templates for every host.

marcindulak commented 6 years ago

Let me be more precise about my question - consul_agent_group_name is not used:

$ git clone https://github.com/andrewrothstein/ansible-consul-cluster
$ grep consul_agent_group_name -r ansible-consul-cluster
ansible-consul-cluster/defaults/main.yml:consul_agent_group_name: consul

I'm interested in the idea of having two inventory groups consul_agent_server_group_name and consul_agent_group_name, but still don't see how this would work in practice.