# Ansible Collection - enbewe.caddy Collecion for various tasks, based on caddy (https://caddyserver.com/), and related things. ## Playbooks ### enbewe.caddy.deploy Deploys several roles to matching host groups: * Role `enbewe.caddy.caddy` is deployed to host group `caddy` * Role `enbewe.caddy.static` is deployed to host group `site` * Role `enbewe.caddy.isso` is deployed to host group `isso` ## Roles ### enbewe.caddy.caddy Installs the caddy server in a podman container and configures the server to act as a reverse proxy to all configured sites. #### Required variables **caddy_networks** *(Type: list / elements=string)* The list of podman networks the proxy should be part of. **caddy_sites** *(Type: dict) The sites that caddy should serve. Each site has to have a `name`, that is used as the host in caddy config. Additionally, the site should have the key `proxy_to`, that points to the address of the proxied service, or it should have the key `directives` that can be used to create a free-form config for the site. #### Optional variables **caddy_use_local_certs** *(Default: false)* Enforce usage of local certificates, instead of the default Letsencrypt certs. **caddy_podman_image_name** *(Default: 'docker.io/library/caddy')* Image to use for the caddy container. **caddy_podman_image_tag** *(Default: 'latest')* Tag to use for the caddy container image. **caddy_conf_path** *(Default: '/etc/caddy')* Path where the configuration of caddy should be stored. ### enbewe.caddy.static Installs caddy servers in podman containers and serves one or more static site through them. #### Required variables **static_caddy_sites** *(Type: list / elements=dict)* The list of sites to deploy. Each site has to have to following variables set: **static_caddy_sites.name** *(Type: string)* The name of the site. Used in container names and directories. **static_caddy_sites.network** *(Type: string)* The network the site is deployed in. **static_caddy_sites.volume** *(Type: string)* The name of the volume to use for the data of the container. **static_caddy_sites.archive_url** *(Type: string)* The url to download the site data from. **static_caddy_sites.archive_username** *(Type: string)* The user to authorize with when downloading the archive. **static_caddy_sites.archive_password** *(Type: string)* The password to use when authorizing. **static_caddy_sites.tempfile** *(Type: string)* The path to store the downloaded archive to. ### enbewe.caddy.isso Installs isso comments server in a dedicated podman container. #### Required variables **isso_network** *(Type: string)* The name of the network to use. **isso_cfg_host** *(Type: string)* The website name in isso. **isso_mail_username** *(Type: string)* The username to connect to the mail server with. **isso_mail_password** *(Type: string)* The password to use when connecting to the mail server. **isso_mail_host** *(Type: string)* The host name of the mail server to use for notifications. **isso_mail_port** *(Type: string)* The port to connect to the mail server at. **isso_mail_security** *(Type: string)* The type of security to use with the mail server. Can be 'none', 'starttls' or 'ssl'. **isso_mail_rcpt** *(Type: string)* Mail address to send the notifications to. **isso_mail_from** *(Type: string)* The mail sender to use when sending notifications. **isso_admin_enabled** *(Type: boolean)* Whether the admin interface should be activated. **isso_admin_password** *(Type: string)* The password to use for the admin interface. #### Optional variables **isso_image_name** *(Default: 'ghcr.io/isso-comments/isso')* Image to use for the isso container. **isso_image_tag** *(Default: 'release')* Tag to use for the isso container image. **isso_storage_path** *(Default: '/srv/wwww/isso')* Path where the data of caddy should be stored.