2023-07-30 20:49:18 +00:00
|
|
|
#jinja2: lstrip_blocks: True
|
|
|
|
{{ ansible_managed | comment }}
|
|
|
|
[Install]
|
|
|
|
WantedBy=default.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Restart=on-failure
|
|
|
|
RestartSec=5s
|
|
|
|
|
|
|
|
ExecReload=/usr/bin/podman kill --signal=SIGHUP {{ __vault_container_name }}
|
|
|
|
|
|
|
|
[Container]
|
|
|
|
Image={{ vault_image }}
|
|
|
|
ContainerName={{ __vault_container_name }}
|
|
|
|
Exec=/usr/local/bin/docker-entrypoint.sh server
|
|
|
|
EnvironmentFile=/etc/containers/systemd/vault.env
|
|
|
|
{% for item in vault_volumes %}
|
2023-07-31 20:16:26 +00:00
|
|
|
Volume={{ item.name }}:{{ item.dest }}{{ ":" + item.opts if item.opts is defined else "" }}
|
2023-07-30 20:49:18 +00:00
|
|
|
{% endfor %}
|
2023-08-05 15:43:16 +00:00
|
|
|
{% if (vault_cap_add + vault_cap_drop) | length > 0 %}
|
2023-07-30 20:49:18 +00:00
|
|
|
|
|
|
|
{% if vault_cap_add | length > 0 %}
|
|
|
|
AddCapability={{ vault_cap_add | join(" ") }}
|
|
|
|
{% endif %}
|
|
|
|
{% if vault_cap_drop | length > 0 %}
|
|
|
|
DropCapability={{ vault_cap_drop | join(" ") }}
|
|
|
|
{% endif %}
|
2023-08-05 15:19:31 +00:00
|
|
|
{% endif %}
|
2023-07-30 20:49:18 +00:00
|
|
|
|
|
|
|
Network={{ vault_network }}
|
|
|
|
{% for item in vault_exposed_ports %}
|
|
|
|
PublishPort={{ item }}
|
|
|
|
{% endfor %}
|
|
|
|
{% for item in vault_podman_args %}
|
|
|
|
PodmanArgs={{ item }}
|
|
|
|
{% endfor %}
|