jelly, caddy, other stuff
This commit is contained in:
parent
5ad30d3343
commit
592992f031
17 changed files with 150 additions and 45 deletions
16
roles/caddy/files/Caddyfile
Normal file
16
roles/caddy/files/Caddyfile
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# The Caddyfile is an easy way to configure your Caddy web server.
|
||||
#
|
||||
# Unless the file starts with a global options block, the first
|
||||
# uncommented line is always the address of your site.
|
||||
#
|
||||
# To use your own domain name (with automatic HTTPS), first make
|
||||
# sure your domain's A/AAAA DNS records are properly pointed to
|
||||
# this machine's public IP, then replace ":80" below with your
|
||||
# domain name.
|
||||
|
||||
media.roosens.me {
|
||||
reverse_proxy localhost:8096
|
||||
}
|
||||
|
||||
# Refer to the Caddy docs for more information:
|
||||
# https://caddyserver.com/docs/caddyfile
|
||||
5
roles/caddy/handlers/main.yml
Normal file
5
roles/caddy/handlers/main.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: reload-caddy
|
||||
service:
|
||||
name: caddy
|
||||
state: reloaded
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
- name: Add Caddy GPG key
|
||||
apt_key:
|
||||
url: "https://dl.cloudsmith.io/public/caddy/stable/gpg.key"
|
||||
|
|
@ -16,3 +17,19 @@
|
|||
apt:
|
||||
name: caddy
|
||||
state: present
|
||||
|
||||
- name: Copy over Caddyfile
|
||||
copy:
|
||||
src: Caddyfile
|
||||
dest: '/etc/caddy/Caddyfile'
|
||||
owner: root
|
||||
group: root
|
||||
mode: '644'
|
||||
notify: reload-caddy
|
||||
|
||||
- name: Ensure Caddy service is running & enabled
|
||||
service:
|
||||
name: caddy
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue