homelab_flarum/roles/flarum/tasks/add_to_cloudflare_tunnel.yml
2024-03-06 11:39:48 -06:00

16 lines
445 B
YAML

---
- name: Add Cloudflare Tunnel route
become: yes
lineinfile:
path: /etc/cloudflared/config.yml
regexp: "- hostname: flarum\\.bubblesthebunny\\.com[\\W]*service: https:\\/\\/localhost:8544"
line: |-
- hostname: flarum.bubblesthebunny.com
service: https://localhost:8544
insertbefore: "- service: http_status:404"
- name: Restart Cloudflared
become: yes
systemd:
name: cloudflared
state: restarted