https://github.com/aboutbits/ansible-caddy-sites
Ansible - Caddy Sites Role
https://github.com/aboutbits/ansible-caddy-sites
ansible ansible-role caddy caddy-sites caddyserver
Last synced: 7 months ago
JSON representation
Ansible - Caddy Sites Role
- Host: GitHub
- URL: https://github.com/aboutbits/ansible-caddy-sites
- Owner: aboutbits
- Created: 2021-06-10T11:35:26.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-07-29T06:32:43.000Z (over 2 years ago)
- Last Synced: 2025-01-08T05:51:39.827Z (about 1 year ago)
- Topics: ansible, ansible-role, caddy, caddy-sites, caddyserver
- Language: Jinja
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
Ansible Caddy Sites Role
========================
Configure Caddy sites role.
## Role Variables
- `caddy_sites_reverse_proxy`: A list of sites, that should be configured as reverse proxy.
## Example Playbook
```yaml
- hosts: all
tasks:
- ansible.builtin.include_role:
name: ansible-caddy-sites
vars:
caddy_sites_reverse_proxy:
- domain_name: "test1.example.com"
destination_url: https://example.com
- domain_name: "test2.example.com"
destination_url: https://example.com
compression: true
headers_up:
- operation: +
field: Host
value: example.com
tls_dns:
provider: digitalocean
config: xxx
caddy_sites_redirect:
- domain_name: "test1.example.com"
destination_url: https://example.com
tls_dns:
provider: digitalocean
config: xxx
- domain_name: "test2.example.com"
destination_url: https://example.com
tls_certificate:
private_key: private-key-content
certificate: certificate-content
- domain_name: "test2.example.com"
destination_url: https://example.com
permanent: true
```
## Versioning
In order to have a versioning in place and working, create lightweight tags that point to the appropriate minor release versions.
Creating a new minor release:
```bash
git tag v2
git push --tags
```
Replacing an already existing minor release:
```bash
git tag -d v2
git push origin :refs/tags/v2
git tag v2
git push --tags
```