summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2024-02-07 11:55:44 +0200
committerLars Wirzenius <liw@liw.fi>2024-02-07 11:55:44 +0200
commit89ddbdb9c72d02af78e167669d576f0a5742cbd3 (patch)
tree3ac730fa32c9ce3342cb80aae9d0233c1717b405
parent287936293be9429188caea31001c3fb1fecf8351 (diff)
downloadansibleness-89ddbdb9c72d02af78e167669d576f0a5742cbd3.tar.gz
radicle-other-node: start node as a service using systemd
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
-rw-r--r--ansible/radicle-other-node.yml28
1 files changed, 28 insertions, 0 deletions
diff --git a/ansible/radicle-other-node.yml b/ansible/radicle-other-node.yml
index 3904a22..5f24b25 100644
--- a/ansible/radicle-other-node.yml
+++ b/ansible/radicle-other-node.yml
@@ -46,6 +46,34 @@
curl -sSf https://radicle.xyz/install > radicle-install
sudo -u _rad bash radicle-install
+ - name: "install systemd unit for Radicle node"
+ copy:
+ content: |
+ [Unit]
+ After=syslog.target network.target
+ Description=Radicle Node
+
+ [Service]
+ Type=simple
+ ExecStart=/home/_rad/.radicle/bin/radicle-node --listen 0.0.0.0:8776
+ Environment=RAD_HOME=/home/_rad/.radicle
+ KillMode=process
+ Restart=never
+ RestartSec=1
+ User=_rad
+ Group=_rad
+
+ [Install]
+ WantedBy=default.target
+ dest: /lib/systemd/system/radicle-node.service
+
+ - name: "enable systemd unit for Radicle node"
+ systemd:
+ name: radicle-node
+ state: restarted
+ masked: no
+ enabled: yes
+ daemon_reload: yes
vars:
sane_debian_system_version: 2
sane_debian_system_hostname: "{{ inventory_hostname }}"