2017-04-24 10:48:25 -04:00
|
|
|
{%- from "vault/map.jinja" import vault with context -%}
|
|
|
|
[Unit]
|
|
|
|
Description=vault server
|
|
|
|
Requires=network-online.target
|
2018-05-15 00:42:18 -04:00
|
|
|
After=network-online.target{% if vault.storage and vault.storage.type == "consul" %} consul.service{% endif %}
|
2017-04-24 10:48:25 -04:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
EnvironmentFile=-/etc/sysconfig/vault
|
2017-06-06 11:20:44 -04:00
|
|
|
User={{ vault.user }}
|
|
|
|
Group={{ vault.group }}
|
2018-05-15 00:42:18 -04:00
|
|
|
ExecStart=/usr/local/bin/vault server {% if vault.dev_mode %}-dev{% else %}-config="/etc/vault.d/config.hcl"{% endif %}
|
|
|
|
ExecReload=/bin/kill -signal HUP $MAINPID
|
|
|
|
ExecStop=/usr/local/bin/vault operator step-down
|
|
|
|
Restart=on-failure
|
|
|
|
CapabilityBoundingSet=CAP_SYSLOG CAP_IPC_LOCK
|
|
|
|
SecureBits=keep-caps
|
|
|
|
NoNewPrivileges=yes
|
|
|
|
KillSignal=SIGINT
|