Add consul and name the agent

This commit is contained in:
2023-12-05 21:16:40 +11:00
parent e710b74a12
commit 472b198618
8 changed files with 102 additions and 25 deletions

View File

@@ -0,0 +1,23 @@
[Unit]
Description=Layer nomad & consul with rpm-ostree
Wants=network-online.target
After=network-online.target
# We run before `zincati.service` to avoid conflicting rpm-ostree
# transactions.
Before=zincati.service
ConditionPathExists=!/var/lib/%N.stamp
[Service]
Type=oneshot
RemainAfterExit=yes
# `--allow-inactive` ensures that rpm-ostree does not return an error
# if the package is already installed. This is useful if the package is
# added to the root image in a future Fedora CoreOS release as it will
# prevent the service from failing.
ExecStart=/usr/bin/rpm-ostree install --apply-live --allow-inactive consul
ExecStart=systemctl enable consul
ExecStart=/bin/touch /var/lib/%N.stamp
ExecStart=systemctl reboot
[Install]
WantedBy=multi-user.target