This commit is contained in:
2025-11-28 15:32:48 +01:00
parent 26a3000e88
commit b7b2b31b80
6 changed files with 69 additions and 38 deletions

View File

@@ -0,0 +1,34 @@
---
- name: Create caddy-portal directory
file:
path: /opt/caddy-portal
state: directory
owner: root
group: root
mode: '0755'
- name: Download caddy-portal installer
get_url:
url: "https://github.com/caddy-portal/caddy-portal/releases/latest/download/install.sh"
dest: /opt/caddy-portal/install.sh
mode: "0755"
- name: Run caddy-portal installer
command: bash /opt/caddy-portal/install.sh
args:
creates: /usr/local/bin/caddy-portal
register: portal_install
- name: Install systemd service for caddy-portal
template:
src: caddy-portal.service.j2
dest: /etc/systemd/system/caddy-portal.service
notify:
- reload systemd
- restart caddy-portal
- name: Enable caddy-portal
systemd:
name: caddy-portal
enabled: true
state: started