ansible-consul
ansible-consul copied to clipboard
Service with multiple addresses
First off — thanks so much for publishing this role. :)
I'm looking to do something like this: https://github.com/hashicorp/consul/issues/1659#issuecomment-320854604
Context — I want to return multiple backends in HAProxy (via SRV
records).
But since the role writes out configuration as with the service.name, it just overwrites my previous consul services:
consul_services:
- name: app
address: 1.2.3.4
id: app.id1
- name: app
address: 5.6.7.8
id: app.id2
I'd probably reverse it and use the service.id
instead, but it's not a mandatory field, etc.. Also sounds like a BC break. Any thoughts?
@brianshumate was wondering, would you accept a PR if I changed this? Or rather not?