An ansible role to install and configure Consul agent.
None
Please look at the defaults/main.yml to see all default variables.
---
consul_config:
server: true
data_dir: "/var/consul"
ui: true
The mandatory variable is the consul_config
, this dict is composed by Consul options.
None.
---
- name: "Consul server"
hosts: servers
vars:
# Consul
consul_config:
server: true
datacenter: brazil-01
data_dir: "/var/consul"
bind_addr: "{{ ansible_default_ipv4.address }}"
ui: true
client_addr: "0.0.0.0"
roles:
- role: fabiorphp.consul
This role was created in 2019 by Fábio Ribeiro.