summaryrefslogtreecommitdiff
path: root/ansible/radicle.liw.fi.yml
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2023-12-17 10:21:46 +0200
committerLars Wirzenius <liw@liw.fi>2023-12-17 10:21:46 +0200
commit472f963d2d68679710c8609b28db13894954837f (patch)
tree830e9e42496008a66fe7ee65597fda0ef494a365 /ansible/radicle.liw.fi.yml
parentd279e728aabbb634039290132ba69aa57bd11d46 (diff)
downloadansibleness-472f963d2d68679710c8609b28db13894954837f.tar.gz
radicle.liw.fi: some httpd installation
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
Diffstat (limited to 'ansible/radicle.liw.fi.yml')
-rw-r--r--ansible/radicle.liw.fi.yml49
1 files changed, 49 insertions, 0 deletions
diff --git a/ansible/radicle.liw.fi.yml b/ansible/radicle.liw.fi.yml
index 30edb64..b7e82cc 100644
--- a/ansible/radicle.liw.fi.yml
+++ b/ansible/radicle.liw.fi.yml
@@ -12,10 +12,30 @@
- name: "install important additional packages"
apt:
name:
+ - caddy
- moreutils
- nmap
- ripgrep
+ - name: "install Caddy configuration"
+ copy:
+ content: |
+ :80 {
+ root * /usr/share/caddy
+ }
+ radicle.liw.fi:443 {
+ reverse_proxy 127.0.0.1:8888
+ }
+ dest: /etc/caddy/Caddyfile
+
+ - name: "restart Caddy"
+ systemd:
+ name: radicle-node
+ state: restarted
+ masked: no
+ enabled: yes
+ daemon_reload: yes
+
- name: "install radicle using installer"
shell: |
curl -sSf https://radicle.xyz/install | sudo -u liw bash
@@ -74,6 +94,35 @@
enabled: yes
daemon_reload: yes
+ - name: "install systemd unit for Radicle HTTPD"
+ copy:
+ content: |
+ [Unit]
+ After=syslog.target network.target
+ Description=Radicle HTTPd
+
+ [Service]
+ Type=simple
+ ExecStart=/home/liw/.radicle/bin/radicle-httpd --listen 127.0.0.1:8888
+ Environment=RAD_HOME=/home/liw/.radicle
+ KillMode=process
+ Restart=always
+ RestartSec=1
+ User=liw
+ Group=liw
+
+ [Install]
+ WantedBy=default.target
+ dest: /lib/systemd/system/radicle-httpd.service
+
+ - name: "enable systemd unit for Radicle node"
+ systemd:
+ name: radicle-httpd
+ state: restarted
+ masked: no
+ enabled: yes
+ daemon_reload: yes
+
vars:
ansible_python_interpreter: /usr/bin/python3