andrewrothstein / ansible-consul_cluster

MIT License
7 stars 7 forks source link

server.json.j2 produces unusable /etc/consul/consul.d/consul.json #3

Closed ppouliot closed 6 years ago

ppouliot commented 6 years ago

The line "retry_join" : [{{consul_agent_retry_join}}], needs to produce quoted entries, currently it just produces an array of IP addresses or names which are not contained in quotes. For Example: { "server" : true, "advertise_addr" : "10.1.1.174", "data_dir" : "/var/consul", "client_addr" : "0.0.0.0", "bootstrap_expect" : 2, "retry_join" : [10.1.1.172,10.1.1.170,10.1.1.174], "datacenter" : "dc1", "enable_syslog" : true, "encrypt" : "EYRY+Ks0+i/DZrEicth1tQ==", "ports" : { "dns" : 8600, "http" : 8500

},

"ui" : true , "recursors" : ["10.1.1.1"] , "acl_master_token" : "afadd880-add1-11e6-82f6-1bb51467000c" }

For the consul service and cluster to start properly the line in question needs to be: "retry_join" : ["10.1.1.172:,"10.1.1.170","10.1.1.174"],

andrewrothstein commented 6 years ago

Thanks you for your attention. I think I fixed this in the latest head commit. Can you give it a try?