ansible/roles/docker/tasks/caddy.yml
2024-09-22 08:16:55 -06:00

27 lines
568 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: never
files:
- compose.yml