From 35743e405a1cbc1ffa1e5add1cc32a933343031d Mon Sep 17 00:00:00 2001 From: Paul Stemmet Date: Sat, 20 Apr 2024 13:13:28 +0000 Subject: [PATCH] debian: add open-vault-agent config files --- debian/open-vault-agent.dirs | 1 + debian/open-vault-agent.links | 1 + debian/open-vault-agent@.service | 26 ++++++++++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 debian/open-vault-agent.dirs create mode 100644 debian/open-vault-agent.links create mode 100644 debian/open-vault-agent@.service diff --git a/debian/open-vault-agent.dirs b/debian/open-vault-agent.dirs new file mode 100644 index 0000000..3e2801e --- /dev/null +++ b/debian/open-vault-agent.dirs @@ -0,0 +1 @@ +etc/vault-agent.d diff --git a/debian/open-vault-agent.links b/debian/open-vault-agent.links new file mode 100644 index 0000000..dcbc820 --- /dev/null +++ b/debian/open-vault-agent.links @@ -0,0 +1 @@ +lib/systemd/system/vault-agent@.service lib/systemd/system/open-vault-agent@.service diff --git a/debian/open-vault-agent@.service b/debian/open-vault-agent@.service new file mode 100644 index 0000000..9601900 --- /dev/null +++ b/debian/open-vault-agent@.service @@ -0,0 +1,26 @@ +[Unit] +Description=Vault agent (config:%i) +Documentation=https://developer.hashicorp.com/vault/docs/agent +After=network.target network-online.target + +ConditionPathIsDirectory=/etc/vault-agent.d/%i +ConditionFileNotEmpty=/etc/vault-agent.d/%i/agent.hcl +StartLimitIntervalSec=300 +StartLimitBurst=20 + +[Service] +User=vault +Group=vault +ExecStart=/bin/vault agent -config=/etc/vault-agent.d/%i/agent.hcl +KillSignal=SIGINT + +Environment=GOMAXPROCS=2 +EnvironmentFile=-/etc/default/vault-agent +EnvironmentFile=-/etc/vault-agent.d/%i/agent.env +WorkingDirectory=/etc/vault-agent.d/%i +TimeoutStopSec=30s +Restart=on-failure +RestartSec=15 + +[Install] +WantedBy=multi-user.target