bob/ansible/roles/caddy/tasks/main.yaml
Marty Oehme e6b6154043
Add caddy reverse proxy role
Acts as reverse proxy for the docker instance. Can be configured through
docker labels. Proxies anything that is received on port 80 or 443.
2025-07-16 22:11:38 +02:00

19 lines
525 B
YAML

- name: Install python requirements
ansible.builtin.package:
name: "{{ item }}"
state: present
loop:
- python3-yaml # for docker compose_v2
- python3-requests # for docker network
- name: Ensure caddy network exists
community.docker.docker_network:
name: caddy
- name: Start the compose stack
community.docker.docker_compose_v2:
project_name: caddy
definition: "{{ lookup('template', 'docker-compose.yaml.j2') | from_yaml }}"
remove_orphans: true
wait: true
wait_timeout: 60