abaez.consul

Consul

license twitter

An Ansible role for installing and configuring a consul systemd instance.

Description

Installs consul with as little configuration as possible on a host. Designed for the host instance of a hashicorp's nomad cluster.

Role Variables

All the default variables are defined in defaults/main.yml. There are two variables you should change, depending on your configuration.

The first is whether you want to have the the default _server.json template file disabled. To disable, you would comment out the use_consul_server variable.

The second is the version of consul to install through consul_version.

The rest of the configurations pertains either to the the current version of consul to install and the _server.json default configuration under the consul_server dictionary variables.

defaults/main.yml

---


# consul version
consul_version: 1.0.6
# use _server.json
use_consul_server: yes

# consul default bind ip
consul_bind: "::1"

# _server.json defaults
consul_server:
  # datacenter name
  datacenter: some-dc
  # data directory for consul
  data_dir: /var/consul
  # log level
  log_level: DEBUG
  # host node name
  node_name: ChangeMe

Usage

Once you've changed the Role Variables, you only need to apply the role to your playbook for it to function as you desired:

- hosts: servers
    roles:
        - abaez.consul

Author Information

Alejandro Baez

About

Role for installing and configuring a consul systemd instance.

Install
ansible-galaxy install abaez.consul
GitHub repository
License
bsd-2-clause
Downloads
139
Owner
This be my github connection. Mostly only to contribute to things. Check instead https://sr.ht/~ab/ for my forge