aboutsummaryrefslogblamecommitdiff
path: root/os/config/roles/consul/templates/consul.json.j2
blob: 73446fe3b205feaaa3e602f3d0c668566758891c (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                                

                                 
                

                  


                                                                                                                     
                                                                               







                        
                

                  
    


                                           
                         

                              
    


                       


                                     

   
{
  "data_dir": "/var/lib/consul",
  "bind_addr": "[::]",
  "advertise_addr": "{{ ipv6 }}",
  "addresses": {
    "dns": "[::]",
    "http": "[::]"
  },
  "retry_join": [
   {% for selected_host in groups['cluster_nodes']|reject("sameas", ansible_fqdn) %}{# @FIXME: Reject doesn't work #}
     "{{ hostvars[selected_host]['ipv6'] }}" {{ "," if not loop.last else "" }}
   {% endfor %}
  ],
  "bootstrap_expect": 3,
  "server": true,
  "ui": true,
  "ports": {
     "dns": 53
  },
  "recursors": [
    "{{ dns_1 }}",
    "{{ dns_2 }}"
  ],
  "encrypt": "{{ consul_gossip_encrypt }}",
  "domain": "2.cluster.deuxfleurs.fr",
  "performance": {
    "raft_multiplier": 5,
    "rpc_hold_timeout": "30s",
    "leave_drain_time": "30s"
  },
  "dns_config": {
    "allow_stale": true
  },
  "telemetry": {
    "disable_hostname": true,
    "prometheus_retention_time": "2h"
  }
}