mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00
Updating Sentry
This commit is contained in:
parent
0d0231ea99
commit
56cd514030
3 changed files with 14 additions and 5 deletions
|
@ -1,14 +1,23 @@
|
||||||
---
|
---
|
||||||
|
- name: Ensure /srv exists and is owned by user
|
||||||
|
become: yes
|
||||||
|
file:
|
||||||
|
path: /srv
|
||||||
|
state: directory
|
||||||
|
owner: "{{ ansible_user }}"
|
||||||
|
group: "{{ ansible_user }}"
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
- name: Pull sentry self-hosted github
|
- name: Pull sentry self-hosted github
|
||||||
git:
|
git:
|
||||||
repo: https://github.com/getsentry/self-hosted.git
|
repo: https://github.com/getsentry/self-hosted.git
|
||||||
dest: /srv/sentry/
|
dest: /srv/sentry/
|
||||||
version: master
|
version: 24.4.1
|
||||||
|
|
||||||
- name: Updating Sentry
|
- name: Updating Sentry
|
||||||
command:
|
command:
|
||||||
chdir: /srv/sentry/
|
chdir: /srv/sentry/
|
||||||
cmd: ./install.sh
|
cmd: ./install.sh --no-report-self-hosted-issues
|
||||||
|
|
||||||
- name: docker-compuse up -d
|
- name: docker-compuse up -d
|
||||||
command:
|
command:
|
||||||
|
@ -24,4 +33,3 @@
|
||||||
notify:
|
notify:
|
||||||
- reload consul
|
- reload consul
|
||||||
when: disable_consul_services_ie_staging is not defined
|
when: disable_consul_services_ie_staging is not defined
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"service": {
|
"service": {
|
||||||
"name": "{{ inventory_hostname|regex_replace('\d+', '') }}",
|
"name": "{{ inventory_hostname|regex_replace('\-?\d+', '')|regex_replace("hdb-", "db-") }}",
|
||||||
"id": "{{ inventory_hostname }}",
|
"id": "{{ inventory_hostname }}",
|
||||||
"tags": [
|
"tags": [
|
||||||
"sentry"
|
"sentry"
|
||||||
|
|
|
@ -518,6 +518,7 @@ def ip_addresses(request):
|
||||||
with open('/srv/newsblur/apps/api/ip_addresses.txt', 'r') as f:
|
with open('/srv/newsblur/apps/api/ip_addresses.txt', 'r') as f:
|
||||||
addresses = f.read()
|
addresses = f.read()
|
||||||
|
|
||||||
mail_admins(f"IP Addresses accessed from {request.META['REMOTE_ADDR']} by {request.user}", addresses)
|
if request.user.is_authenticated:
|
||||||
|
mail_admins(f"IP Addresses accessed from {request.META['REMOTE_ADDR']} by {request.user}", addresses)
|
||||||
|
|
||||||
return HttpResponse(addresses, content_type='text/plain')
|
return HttpResponse(addresses, content_type='text/plain')
|
||||||
|
|
Loading…
Add table
Reference in a new issue