This is a simple ansible role for consul. It does the following tasks:
- Download and validate consul precompiled binary
- Add unit/service definition (systemd)
- Stream configuration based on provided parameters into json-configuration
- Optional: manage firewalld, selinux, dnsmasq
None
Sets the version to download & enable
Download & unpack binary even if the defined version already exists
Overrides any default settings for the application. These are written to disk on the host. Example:
config_overrides:
client_addr: "0.0.0.0"
server: true
bootstrap_expect: 1
ui: true
performance:
raft_multiplier: 8
ports:
grpc: 8502
acl:
enabled: true
default_policy: allow
See https://www.consul.io/docs/agent/options.html for details
Default paths to use for files
Enable dnsmasq
Override default dnsmasq settings
Add (default) ports to firewalld
Set SELinux to permissive mode
...
None
Install a single server instance
- hosts: consul
gather_facts: false
pre_tasks:
- name: Ansible and docker requirements
become: true
package:
name:
- iproute
state: present
tasks:
- include_role:
name: consul
vars:
config_overrides:
client_addr: "0.0.0.0"
server: true
bootstrap_expect: 1
ui: true
configure_dnsmasq: true
MIT
N/A