Update playbooks/apprise.yml
This commit is contained in:
parent
0721b8093e
commit
bec416f937
1 changed files with 46 additions and 0 deletions
|
|
@ -0,0 +1,46 @@
|
|||
- name: Deploy Apprise
|
||||
hosts: docker_hosts
|
||||
become: true
|
||||
|
||||
vars:
|
||||
stack_dir: /opt/stacks/apprise
|
||||
|
||||
tasks:
|
||||
|
||||
- name: Ensure stack directory exists
|
||||
ansible.builtin.file:
|
||||
path: "{{ stack_dir }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Ensure pangolin network exists
|
||||
community.docker.docker_network:
|
||||
name: pangolin
|
||||
state: present
|
||||
|
||||
- name: Deploy compose.yml
|
||||
ansible.builtin.template:
|
||||
src: templates/apprise-compose.yml.j2
|
||||
dest: "{{ stack_dir }}/compose.yml"
|
||||
|
||||
- name: Ensure config directory exists
|
||||
ansible.builtin.file:
|
||||
path: "{{ stack_dir }}/config"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Deploy apprise config
|
||||
ansible.builtin.template:
|
||||
src: templates/apprise.yaml.j2
|
||||
dest: "{{ stack_dir }}/config/apprise.yaml"
|
||||
mode: '0600'
|
||||
|
||||
- name: Pull images
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ stack_dir }}"
|
||||
pull: always
|
||||
|
||||
- name: Start stack
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ stack_dir }}"
|
||||
state: present
|
||||
Loading…
Add table
Add a link
Reference in a new issue