ansible/roles/docker/tasks/caddy.yml
2024-08-13 20:18:11 -06:00

27 lines
569 B
YAML

- name: make caddy directories
ansible.builtin.file:
path: "{{ item}}"
state: directory
loop:
- /opt/stacks/caddy
- name: copy Caddyfile
ansible.builtin.copy:
src: Caddyfile
dest: /opt/stacks/caddy/Caddyfile
owner: root
mode: 644
- name: copy caddy compose file
ansible.builtin.copy:
src: caddy-compose.yml
dest: /opt/stacks/caddy/compose.yml
owner: root
mode: 644
- name: deploy caddy stack
community.docker.docker_compose_v2:
project_src: /opt/stacks/caddy
recreate: always
files:
- compose.yml