Merge branch 'master' of git.fudiggity.nl:ansible/sentry

This commit is contained in:
Sonny Bakker 2022-05-15 21:21:04 +02:00
commit 3a74372252
4 changed files with 26 additions and 18 deletions

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,18 @@
state: restarted
enabled: true
- name: ensure sentry is stopped
systemd:
name: sentry
state: stopped
# restart docker after nftables changes so that it applies docker related rules
- name: restart docker
systemd:
name: docker
state: restarted
enabled: true
- name: create sites directory
file:
path: '/srv/sites'
@ -50,11 +73,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'
@ -64,17 +82,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'

View file

@ -9,6 +9,7 @@
# Mail Server #
###############
# https://stackoverflow.com/questions/47328056/smtpserverdisconnected-connection-unexpectedly-closed-timed-out/47328415#47328415
mail.backend: 'smtp'
mail.host: '{{ smtp_server }}'
mail.port: {{ smtp_port }}

View file

@ -1,5 +1,5 @@
smtp_server: 'smtp.transip.email'
smtp_port: 465
smtp_port: 587
smtp_password: !vault |
$ANSIBLE_VAULT;1.1;AES256
34306430333263396535626334633436623532623536663134656332323239663731343230623035

View file

@ -4,7 +4,7 @@ app_name: 'sentry'
app_dir: '/srv/sites/sentry'
app_url: 'https://sentry.fudiggity.nl'
app_repository: 'https://github.com/getsentry/onpremise.git'
app_branch: '20.7.2'
app_branch: '21.7.0'
app_user: 'sentry'
app_key: !vault |
$ANSIBLE_VAULT;1.1;AES256