61 lines
1.3 KiB
YAML
61 lines
1.3 KiB
YAML
consul:
|
|
# Start Consul agent service and enable it at boot time
|
|
service: True
|
|
|
|
# Set user and group for Consul config files and running service
|
|
user: consul
|
|
group: consul
|
|
bin_dir: /opt/consul/bin
|
|
|
|
version: 0.7.0
|
|
download_host: releases.hashicorp.com
|
|
|
|
config:
|
|
server: True
|
|
bind_addr: 0.0.0.0
|
|
|
|
enable_debug: True
|
|
|
|
datacenter: eu
|
|
|
|
encrypt: "RIxqpNlOXqtr/j4BgvIMEw=="
|
|
|
|
bootstrap_expect: 3
|
|
retry_interval: 15s
|
|
retry_join:
|
|
- 1.1.1.1
|
|
- 2.2.2.2
|
|
|
|
ui: true
|
|
log_level: info
|
|
data_dir: /var/consul
|
|
|
|
register:
|
|
- name: Redis
|
|
checks:
|
|
- script: /usr/local/share/consul/check_redis.py
|
|
interval: 10s
|
|
scripts:
|
|
- source: salt://files/consul/check_redis.py
|
|
name: /usr/local/share/consul/check_redis.py
|
|
context:
|
|
port: 6379
|
|
|
|
consul_template:
|
|
# Start consul-template daemon and enable it at boot time
|
|
service: True
|
|
|
|
config:
|
|
consul: 127.0.0.1:8500
|
|
log_level: info
|
|
|
|
tmpl:
|
|
- name: example.com
|
|
source: salt://files/example.com.ctmpl
|
|
config:
|
|
template:
|
|
source: /etc/consul-template/tmpl-source/example.com.ctmpl
|
|
destination: /etc/nginx/sites-enabled/example.com
|
|
command: systemctl restart nginx
|
|
|
|
# vim: ft=yaml
|