juwai.consul

Ansible Role: Consul

This role installs Consul on CentOS servers.

Requirements

Requires Ansible version 2.0 or higher.

Role Variables

Here are the available variables with their default values (check defaults/main.yml for details):

consul_server

Decides whether to install Consul on the server or not.

Default value is true.

consul_supervisor_enabled

Decides whether to install Consul with supervisor or not.

Default value is true.

consul_user, consul_group

Specifies the user and group for running Consul.

Default values are consul:consul.

consul_version

The default version of Consul is 1.9.4.

consul_url

The URL from where to download the Consul package.

consul_ui

Enables the user interface for Consul or not.

Default value is true.

consul_dir, consul_conf_dir, consul_data_dir, consul_log_dir

Directories for Consul.

/home/consul/consul_0.5.0
├── bin
├── consul.d
├── data
└── logs

Consul configuration

For more options, please refer to http://www.consul.io/docs/agent/options.html.

rpc_services

This allows you to configure RPC services in Consul.

For example, to install a time_service and bind it to port 8081, you can set it up like this (also remember to add tags and check):

rpc_services:
  - name: time_service
    port: 8081
    tags: ["rpc"]
    check: "zerorpc --connect tcp://127.0.0.1:8081 --timeout 1 _zerorpc_ping"
    interval: 60s

Dependencies

  • juwai.supervisor, if supervisor_enabled is set to true.

Example Playbook

- hosts: servers
  roles:
    - { role: juwai.consul, when: server}

License

MIT License

Author Information

This role was created in 2015 by Juwai Limited.

Informazioni sul progetto

Ansible role for Consul

Installa
ansible-galaxy install juwai.consul
Licenza
mit
Download
1.1k
Proprietario
Where Chinese find international property