add caddy shit

This commit is contained in:
2023-04-19 21:23:19 +05:30
parent b9656b2247
commit 1e34416958
4 changed files with 46 additions and 0 deletions

28
templates/Caddyfile.j2 Normal file
View File

@@ -0,0 +1,28 @@
#{
# acme_dns rfc2136 {
# key_name "dynupd"
# key_alg "hmac-sha256"
# # declared in secrets.en: https://aryak.me/blog/01-knot
# key "{{ rfc2136_key }}"
# server "107.189.12.96:53"
# }
# acme_ca https://acme-v02.api.letsencrypt.org/directory
#}
:80 {
redir https://wiki.projectsegfau.lt/index.php?title={{ inventory_hostname }}
}
{% if inventory_hostname == 'ansible01' %}
:691 {
redir https://wiki.projectsegfau.lt/index.php?title={{ inventory_hostname }}
}
{% elif inventory_hostname == 'ansible02' %}
:692 {
redir https://wiki.projectsegfau.lt/index.php?title={{ inventory_hostname }}
}
{% elif inventory_hostname == 'ansible03' %}
:693 {
redir https://wiki.projectsegfau.lt/index.php?title={{ inventory_hostname }}
}
{% else %}
# Nothing extra defined
{% endif %}