35 lines
809 B
YAML
35 lines
809 B
YAML
---
|
|
- 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
|