branch
This commit is contained in:
34
roles/reverseproxy/tasks/install_caddy_portal.yml
Normal file
34
roles/reverseproxy/tasks/install_caddy_portal.yml
Normal 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
|
||||
Reference in New Issue
Block a user