Add basic caddy role
This commit is contained in:
17
roles/caddy/templates/etc/caddy/conf.d/vhost.j2
Normal file
17
roles/caddy/templates/etc/caddy/conf.d/vhost.j2
Normal file
@ -0,0 +1,17 @@
|
||||
{{ ansible_managed | comment }}
|
||||
|
||||
{# helper variables and per-site defaults that we can't set in role defaults #}
|
||||
{% set domain_name = item.domain_name %}
|
||||
{% set domain_aliases = item.domain_aliases | default("") %}
|
||||
{# assume optional features are off unless a vhost explicitly sets them #}
|
||||
{% set has_wordpress = item.has_wordpress | default(false) %}
|
||||
{% set needs_php = item.needs_php | default(false) %}
|
||||
{% set has_gitea = item.has_gitea | default(false) %}
|
||||
|
||||
{{ domain_name }} {
|
||||
{% if has_gitea %}
|
||||
reverse_proxy :3000
|
||||
{% endif %}
|
||||
|
||||
import security-headers
|
||||
}
|
Reference in New Issue
Block a user