Skip to content
An ansible role to install and configure Consul agent.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
defaults
meta
molecule/default
tasks
templates
.gitignore
.travis.yml
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.md
requirements.txt

README.md

Ansible Role: Consul

Build Status License

An ansible role to install and configure Consul agent.

Requirements

None

Role Variables

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.

Dependencies

None.

Example Playbook

---
- 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

Author Information

This role was created in 2019 by Fábio Ribeiro.

You can’t perform that action at this time.