about summary refs log tree commit diff
path: root/ansible/roles/caddy/tasks
diff options
context:
space:
mode:
authormakefunstuff <[email protected]>2024-07-18 21:32:36 +0200
committermakefunstuff <[email protected]>2024-07-18 21:32:36 +0200
commit806607a58675a3f28694602b16762f9cdd5dac60 (patch)
treea0fc3b03159e608e115de68785192d2c54480d28 /ansible/roles/caddy/tasks
parent07822ea3f2239cf9cd3335ad2d7fb0aab7a3e1dc (diff)
downloadk3s-lab-806607a58675a3f28694602b16762f9cdd5dac60.tar.gz
ansible
Diffstat (limited to 'ansible/roles/caddy/tasks')
-rw-r--r--ansible/roles/caddy/tasks/main.yml15
1 files changed, 15 insertions, 0 deletions
diff --git a/ansible/roles/caddy/tasks/main.yml b/ansible/roles/caddy/tasks/main.yml
new file mode 100644
index 0000000..5caaa18
--- /dev/null
+++ b/ansible/roles/caddy/tasks/main.yml
@@ -0,0 +1,15 @@
+---
+- name: Install Caddy
+  shell: |
+    apt install -y debian-keyring debian-archive-keyring apt-transport-https
+    curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | apt-key add -
+    curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list
+    apt update
+    apt install caddy
+
+- name: Setup Caddy for SourceHut and Soft-Serve
+  copy:
+    src: Caddyfile
+    dest: /etc/caddy/Caddyfile
+  notify: Reload Caddy
+