Include glitchtip provisioning
This commit is contained in:
parent
86a81c6e52
commit
0d7666185c
6 changed files with 119 additions and 4 deletions
42
tasks/glitchtip.yml
Normal file
42
tasks/glitchtip.yml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
- name: Create required directories
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: '{{ item.path }}'
|
||||
state: '{{ item.state }}'
|
||||
mode: '{{ item.mode }}'
|
||||
owner: '{{ item.owner }}'
|
||||
group: '{{ item.group }}'
|
||||
loop:
|
||||
- path: '{{ glitchtip_app_dir }}'
|
||||
owner: sonny
|
||||
group: sonny
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Copy docker-compose file
|
||||
ansible.builtin.template:
|
||||
src: templates/glitchtip/docker-compose.j2
|
||||
dest: '{{ glitchtip_app_dir }}/docker-compose.yml'
|
||||
mode: '0750'
|
||||
|
||||
- name: Stop current containers
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: '{{ glitchtip_app_dir }}'
|
||||
state: stopped
|
||||
|
||||
- name: Pull missing image
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: '{{ glitchtip_app_dir }}'
|
||||
pull: missing
|
||||
state: stopped
|
||||
|
||||
- name: Remove dangling containers
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: '{{ glitchtip_app_dir }}'
|
||||
remove_orphans: true
|
||||
state: stopped
|
||||
|
||||
- name: Start container
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: '{{ glitchtip_app_dir }}'
|
||||
state: present
|
||||
Loading…
Add table
Add a link
Reference in a new issue