formula-consul/pillar.example
2017-11-28 12:16:19 +02:00

53 lines
1.1 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
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
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