ansible role to configure consul
MIT License
ansible role to configure consul
https://galaxy.ansible.com/suzuki-shunsuke/consul_config
This role doesn't install consul. If you want to install, please use akoi and suzuki-shunsuke.akoi.
packages:
consul:
url: "https://releases.hashicorp.com/consul/{{.Version}}/consul_{{.Version}}_linux_amd64.zip"
version: 1.2.1
files:
- name: consul
archive: consul
consul_user
default:consulconsul_group
default:consuldata_dir/ default:/opt/consul
consul_pid_file default:/var/run/consul/consul.pid
consul_config_file default:/etc/consul/consul.json
consul_configd_path/ default:/etc/consul/consul.d/
service.json
consul_service_unit_file default:/etc/systemd/system/consul.service
Nothing.
Required variables are nothing. Please see
restart consul
If consul_use_systemd
is true
, systemd's service is restarted.
You can define custom handlers. For example, if you manage consul with supervisor,
handlers:
- name: restart consul (supervisor)
supervisorctl:
name: consul
state: restarted
listen: restart consul
- hosts: servers
roles:
- role: suzuki-shunsuke.consul_config
consul_path: /usr/local/bin/consul
consul_config_files:
web:
service:
name: web
tags:
- rails
port: 80
become: yes
See CHANGELOG.md.
See CONTRIBUTING.md.