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

Service with multiple addresses

Open till opened this issue 4 years ago • 1 comments

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?

till avatar Aug 31 '19 16:08 till

@brianshumate was wondering, would you accept a PR if I changed this? Or rather not?

till avatar Dec 23 '19 14:12 till