ansible-consul icon indicating copy to clipboard operation
ansible-consul copied to clipboard

Is consul_node_name variable necessary?

Open paretl opened this issue 4 years ago • 0 comments

Hi,

I explain my question: As Consul has a default value for node_name, which is the hostname of the machine (https://www.consul.io/docs/agent/options.html#node_name), we can use this value.

My idea is:

  • By default, do not set the variable consul_node_name. So the attribute node_name won't be set up and will use the hostname of the server by default
  • We can override the value of node_name by setting the Ansible variable consul_node_name.

My case is that I build machine images with Packer and it installs Consul with this job. But the node_name is set with the hostname of the Packer machine and cannot be changed at the startup of the instance (from the machine image)

What do you think about that? I would like to have some feedback before creating the PR associated.

Thanks, Louis

EDIT: I created the PR associated.

paretl avatar Feb 12 '20 16:02 paretl