--- - name: Update APT Cache apt: update_cache: yes - name: Install Docker Compose apt: name: docker-compose-plugin state: latest - name: Download Sentry Self Hosting Archive become: yes become_user: frappe unarchive: src: http://git.jingrow.com/getsentry/self-hosted/archive/refs/tags/25.7.0.tar.gz dest: /tmp remote_src: yes - name: Create Sentry Directory become: yes become_user: frappe copy: src: /tmp/self-hosted-25.7.0/ dest: /home/frappe/sentry remote_src: yes - name: Create Sentry Environment File become: yes become_user: frappe template: src: sentry.env dest: /home/frappe/sentry/.env.custom - name: Create Sentry Enhance Image File become: yes become_user: frappe template: src: enhance-image.sh dest: /home/frappe/sentry/sentry/enhance-image.sh mode: 0777 - name: Create Sentry YAML Config File become: yes become_user: frappe template: src: sentry.yml.jinja2 dest: /home/frappe/sentry/sentry/config.yml - name: Fix Kafka/Zookeeper volume permissions become: yes become_user: frappe replace: path: /home/frappe/sentry/docker-compose.yml regexp: '^((\s+)image: "confluentinc/cp-(zookeeper|kafka):.*")$' replace: '\1\n\2user: "0:0"' # \1 matches the whole line. \2 matches the indentation. - name: Install Sentry become: yes become_user: frappe shell: cmd: echo "no" | bash install.sh --no-report-self-hosted-issues --skip-user-prompt chdir: /home/frappe/sentry - name: Create Sentry Python Config File become: yes become_user: frappe lineinfile: path: /home/frappe/sentry/sentry/sentry.conf.py line: "{{ lookup('template', 'sentry.conf.py') }}" - name: Create Sentry User become: yes become_user: frappe command: docker compose run --rm web createuser --no-input --superuser --email {{ sentry_admin_email }} --password {{ sentry_admin_password }} --force-update args: chdir: /home/frappe/sentry - name: Start Sentry become: yes become_user: frappe command: docker compose --env-file /home/frappe/sentry/.env.custom up -d args: chdir: /home/frappe/sentry - name: Setup NGINX Proxy for Sentry become: yes become_user: frappe command: /home/jingrow/agent/env/bin/agent setup trace args: chdir: /home/jingrow/agent