ansible-consul
ansible-consul copied to clipboard
Is consul_node_name variable necessary?
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 attributenode_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 variableconsul_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.