mattfinlayson / ansible-consul

Ansible role for consul
Apache License 2.0
233 stars 181 forks source link

remove redundant consule CLI flags at consul init script #136

Open rolandjohann opened 8 years ago

rolandjohann commented 8 years ago

The flags -bind and -client will be overridden with auto generated content from the init script (consul.conf.j2). So you are not able to provide them via configuration.

nickvanw commented 8 years ago

I think I'm running into the same issue, but I want to confirm.

In the upstart config here, if consul_client_address_bind is set, the config will automatically use the address of eth0 for the -client flag.

But if the user sets consul_client_address_bind AND consul_client_address here, then the configuration option equivalent of -client will be set.

Functionally, this means the user cannot set client_addr, as the flag overrides the config option.

I assume the same is true for the bind option?

If so, I would propose that when both address and address_bind are set, the upstart config do nothing, and let the consul.json file configure the address. I can/will put this up to a PR, if it sounds good @savagegus

lhoss commented 7 years ago

If so, I would propose that when both address and address_bind are set, the upstart config do nothing, and let the consul.json file configure the address. I can/will put this up to a PR, if it sounds good @savagegus

+1 👍

Current config is quite buggy, also due to the hardcoded eth0 iface, see: https://github.com/savagegus/ansible-consul/issues/103#issuecomment-325707696