[hopeless-masquerade] tailscale
Now that this is on Tailscale, we don't need to proxy through
mountain-of-faith to use Caddy running on lotus-land-story.
change klulkskrstwmktynumxqxsxstomqqswl
commit aaec2d65301665f4333b4801601556d26148704b
author Alpha Chen <alpha@kejadlen.dev>
date
parent spqvnuvo
diff --git a/lotus-land-story/main.yml b/lotus-land-story/main.yml
index 09f3cd9..d32518d 100644
--- a/lotus-land-story/main.yml
+++ b/lotus-land-story/main.yml
@@ -25,7 +25,10 @@
 
 - import_playbook: ../playbooks/tailscale.yml # noqa: name[play]
 - import_playbook: ../playbooks/docker.yml    # noqa: name[play]
+
+# TODO consolidate this into the other playbook?
 - import_playbook: docker.yml                 # noqa: name[play]
+
 - import_playbook: postgres.yml               # noqa: name[play]
 - import_playbook: redis.yml                  # noqa: name[play]
 
diff --git a/lotus-land-story/templates/Caddyfile b/lotus-land-story/templates/Caddyfile
index a6acd4e..6dca1c7 100644
--- a/lotus-land-story/templates/Caddyfile
+++ b/lotus-land-story/templates/Caddyfile
@@ -149,7 +149,7 @@ home-assistant {
 pihole {
 	tls internal
 	bind tailscale/pihole
-	reverse_proxy mountain-of-faith:8080
+	reverse_proxy mountain-of-faith:80
 }
 
 ### External
@@ -157,7 +157,7 @@ pihole {
 birdnetpi.chislan.family
 	log
 
-	reverse_proxy mountain-of-faith:8081
+	reverse_proxy hopeless-masquerade:80
 }
 
 git.kejadlen.dev {
diff --git a/mountain-of-faith/caddy.yml b/mountain-of-faith/caddy.yml
deleted file mode 100644
index af696c9..0000000
--- a/mountain-of-faith/caddy.yml
+++ /dev/null
@@ -1,83 +0,0 @@
-# https://caddyserver.com/docs/install#debian-ubuntu-raspbian
-
-- name: Run Caddy
-  tags: caddy
-  hosts: mountain-of-faith
-  become: true
-  tasks:
-
-    # sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
-    - name: Install prerequisites
-      ansible.builtin.apt:
-        pkg:
-          - apt-transport-https
-          - curl
-          - debian-archive-keyring
-          - debian-keyring
-        state: present
-        update_cache: true
-
-    # curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
-    # chmod o+r /usr/share/keyrings/caddy-stable-archive-keyring.gpg
-    - name: Add Caddy GPG key
-      ansible.builtin.apt_key:
-        url: https://dl.cloudsmith.io/public/caddy/stable/gpg.key
-        keyring: /usr/share/keyrings/caddy-stable-archive-keyring.gpg
-        state: present
-
-    - name: Set permissions on Caddy keyring
-      ansible.builtin.file:
-        path: /usr/share/keyrings/caddy-stable-archive-keyring.gpg
-        mode: '0644'
-
-    # curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
-    # chmod o+r /etc/apt/sources.list.d/caddy-stable.list
-    - name: Add Caddy repository
-      ansible.builtin.apt_repository:
-        repo: "deb [signed-by=/usr/share/keyrings/caddy-stable-archive-keyring.gpg] https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main"
-        filename: caddy-stable
-        state: present
-
-    # sudo apt update
-    # sudo apt install caddy
-    - name: Install Caddy
-      ansible.builtin.apt:
-        name: caddy
-        state: present
-        update_cache: true
-
-    - name: Configure Caddy
-      ansible.builtin.copy:
-        content: |
-          # Since I don't want to run Tailscale on the BirdNET-Pi, this uses
-          # mountain-of-faith as a passthrough since they're on the same
-          # network.
-          :8081 {
-            # It would be nice for this to be hopeless-masquerade.local, but
-            # Caddy can't resolve mDNS (see below issue). The workaround in the
-            # issue of using systemd-resolved also doesn't work since then we
-            # have contention over /etc/resolv.conf between systemd-resolved
-            # and Tailscale. So we use just the raw IP for now.
-            #
-            # https://github.com/caddyserver/caddy/issues/5372
-            reverse_proxy 192.168.2.161
-          }
-        dest: /etc/caddy/Caddyfile
-        mode: "0644"
-      notify: Restart Caddy
-
-  handlers:
-    - name: Restart Caddy
-      ansible.builtin.systemd:
-        name: caddy
-        state: restarted
-        enabled: true
-
-    - name: Restart systemd-resolved
-      ansible.builtin.systemd:
-        name: systemd-resolved
-        state: restarted
-        enabled: true
-
-
-# vim: ft=yaml.ansible
diff --git a/mountain-of-faith/main.yml b/mountain-of-faith/main.yml
index 82f81e7..c5760f7 100644
--- a/mountain-of-faith/main.yml
+++ b/mountain-of-faith/main.yml
@@ -102,7 +102,7 @@
         ports:
           - "53:53/tcp"
           - "53:53/udp"
-          - "8080:80/tcp"
+          - "80:80/tcp"
           # - "443:443/tcp"
           # - "67:67/udp" # DHCP
           # - "123:123/udp" # NTP
@@ -122,7 +122,6 @@
         restart_policy: unless-stopped
         state: started
 
-- import_playbook: caddy.yml
 - import_playbook: minio.yml
 - import_playbook: syncthing.yml