--- - 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: jingrow unarchive: src: http://git.jingrow.com/getsentry/self-hosted/archive/refs/tags/24.6.0.tar.gz dest: /tmp remote_src: yes - name: Stop Sentry become: yes become_user: jingrow command: docker-compose down --remove-orphans args: chdir: /home/jingrow/sentry - name: Remove Sentry Directory become: yes become_user: jingrow file: path: /home/jingrow/sentry state: absent - name: Create Sentry Directory become: yes become_user: jingrow copy: src: /tmp/self-hosted-24.6.0/ dest: /home/jingrow/sentry remote_src: yes - name: Create Sentry Environment File become: yes become_user: jingrow template: src: ../../sentry/templates/sentry.env dest: /home/jingrow/sentry/.env.custom - name: Create Sentry Enhance Image File become: yes become_user: jingrow template: src: ../../sentry/templates/enhance-image.sh dest: /home/jingrow/sentry/sentry/enhance-image.sh mode: 0777 - name: Create Sentry YAML Config File become: yes become_user: jingrow template: src: ../../sentry/templates/sentry.yml.jinja2 dest: /home/jingrow/sentry/sentry/config.yml - name: Fix Kafka/Zookeeper volume permissions become: yes become_user: jingrow replace: path: /home/jingrow/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: jingrow shell: cmd: echo "no" | bash install.sh --no-report-self-hosted-issues chdir: /home/jingrow/sentry - name: Create Sentry Python Config File become: yes become_user: jingrow lineinfile: path: /home/jingrow/sentry/sentry/sentry.conf.py line: "{{ lookup('template', '../../sentry/templates/sentry.conf.py') }}" - name: Start Sentry become: yes become_user: jingrow command: docker-compose --env-file /home/jingrow/sentry/.env.custom up -d args: chdir: /home/jingrow/sentry