- name: Create working directory
file:
path: /srv/alerts
state: directory
- name: Copy server config
copy:
src: "{{ role_path }}/ntfy_server.yml"
dest: /srv/alerts/ntfy_server.yml
- name: Copy Docker stack file
template:
src: "{{ role_path }}/docker-stack.yml"
dest: /srv/alerts/docker-stack.yml
- name: Deploy Docker stack
docker_stack:
name: alerts
compose:
- /srv/alerts/docker-stack.yml