Fix systemd service unit

EnvironmentFile was statically set when it should've been pointing to
/etc/default/vault
for Debian and
/etc/sysconfig/vault
for CentOS/EL.
This commit is contained in:
Eric Renfro 2018-05-16 14:50:13 -04:00
parent 121aa08c16
commit e83b34c806

View file

@ -4,7 +4,7 @@ Requires=network-online.target
After=network-online.target{% if config.storage and config.storage.type == "consul" %} consul.service{% endif %} After=network-online.target{% if config.storage and config.storage.type == "consul" %} consul.service{% endif %}
[Service] [Service]
EnvironmentFile=-/etc/sysconfig/vault EnvironmentFile=-/etc/{% if grains['os_family'] == 'Debian' %}default{% else %}sysconfig{% endif %}/vault
User={{ user }} User={{ user }}
Group={{ group }} Group={{ group }}
ExecStart=/usr/local/bin/vault server {% if config.dev_mode %}-dev{% else %}-config="/etc/vault.d/config.hcl"{% endif %} ExecStart=/usr/local/bin/vault server {% if config.dev_mode %}-dev{% else %}-config="/etc/vault.d/config.hcl"{% endif %}