reverse_proxy role

This commit is contained in:
uumas
2021-12-20 04:37:09 +02:00
parent 9bae204060
commit f0b0d7c66c
7 changed files with 35 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
---
- name: Add caddy reverse proxy config
blockinfile:
path: /etc/caddy/Caddyfile
marker: "# {mark} ANSIBLE MANAGED BLOCK {{ vhost_id }}"
block: |
{{ vhost_domains | join(' ') }} {
reverse_proxy {{ proxy_target }}
}
validate: 'caddy validate --config %s --adapter caddyfile'
backup: true
notify: reload caddy