consul.service.j2 357 B

1234567891011121314151617181920
  1. [Unit]
  2. Description=Consul
  3. After=network.target
  4. [Service]
  5. Type=simple
  6. User=consul
  7. Group=consul
  8. ExecStart=/usr/local/bin/consul agent \
  9. -config-file=/etc/consul/consul.json \
  10. -data-dir=/var/lib/consul \
  11. -bind={{ consul_server }} \
  12. -client=0.0.0.0 \
  13. -server \
  14. -bootstrap-expect=1
  15. Restart=always
  16. RestartSec=10
  17. [Install]
  18. WantedBy=multi-user.target