diff --git a/provision-contest/ansible/group_vars/all/secret.yml.example b/provision-contest/ansible/group_vars/all/secret.yml.example index 2b1a0932..8e86e0ef 100644 --- a/provision-contest/ansible/group_vars/all/secret.yml.example +++ b/provision-contest/ansible/group_vars/all/secret.yml.example @@ -66,3 +66,6 @@ CDS_CONTESTS: password: admin PRESCLIENT_CONTEST: nwerc18 + +# Sentry DSN URL +# SENTRY_DSN: diff --git a/provision-contest/ansible/roles/domserver/tasks/main.yml b/provision-contest/ansible/roles/domserver/tasks/main.yml index 57415436..28bb5df3 100644 --- a/provision-contest/ansible/roles/domserver/tasks/main.yml +++ b/provision-contest/ansible/roles/domserver/tasks/main.yml @@ -112,3 +112,14 @@ loop: - nginx - php{{ php_version.stdout }}-fpm + +- name: Send errors to Sentry + lineinfile: + regexp: '^SENTRY_DSN=' + state: present + line: "SENTRY_DSN={{ SENTRY_DSN | default('') }}" + dest: "{{ DJ_DIR }}/webapp/.env.local" + create: true + mode: 0664 + group: domjudge + owner: domjudge