28 lines
592 B
YAML
28 lines
592 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
|
|
notify: restart caddy
|
|
|
|
- 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 |