Stop sentry before restarting docker

This commit is contained in:
Sonny Bakker 2021-02-04 22:17:41 +01:00
parent f827fcab4c
commit 4346394614

View file

@ -1,3 +1,14 @@
- name: copy sentry systemd service
template:
src: '{{ item.src }}'
dest: '{{ item.dest }}'
owner: '{{ app_user }}'
group: '{{ app_user }}'
mode: '0644'
loop:
- { src: 'templates/sentry.systemd.j2', dest: '/etc/systemd/system/sentry.service' }
notify: restart sentry
- name: copy firewall templates
template:
src: '{{ item.src }}'
@ -14,6 +25,11 @@
state: restarted
enabled: true
- name: ensure sentry is stopped
systemd:
name: sentry
state: stopped
- name: restart docker
systemd:
name: docker
@ -56,11 +72,6 @@
- { src: 'templates/sentry.conf.j2', dest: '{{ app_dir }}/sentry/sentry.conf.py' }
- { src: 'templates/sentry.config.j2', dest: '{{ app_dir }}/sentry/config.yml' }
- name: ensure sentry is stopped
systemd:
name: sentry
state: stopped
# can be ran multiple times to upgrade sentry
- name: run sentry installer
command: './install.sh'
@ -70,17 +81,6 @@
SENTRY_IMAGE: 'getsentry/sentry:{{ app_branch }}'
ignore_errors: true
- name: copy sentry systemd service
template:
src: '{{ item.src }}'
dest: '{{ item.dest }}'
owner: '{{ app_user }}'
group: '{{ app_user }}'
mode: '0644'
loop:
- { src: 'templates/sentry.systemd.j2', dest: '/etc/systemd/system/sentry.service' }
notify: restart sentry
- name: copy nginx sentry config
template:
src: 'templates/nginx.j2'