---
- name: Install RPM packages
  ansible.builtin.dnf:
    disable_gpg_check: true
    install_weak_deps: false
    name:
      - patch
      - squirro-python311-alembic
      - squirro-python311-camelot-py
      - squirro-python311-compressed-rtf
      - squirro-python311-fpdf2
      - squirro-python311-imapclient
      - squirro-python311-importlib-metadata
      - squirro-python311-olefile
      - squirro-python311-opencv
      - squirro-python311-pypdf
      - squirro-python311-rq
      - squirro-python311-tzlocal
      - squirro-python311-xlsxwriter
      - unzip
      - zbar
      - /opt/squirro/octopus/assets/dependencies/GraphicsMagick-1.3.40-3.fc39.x86_64.rpm
      - /opt/squirro/octopus/assets/dependencies/libv4l-1.25.0-3.fc39.x86_64.rpm
      - /opt/squirro/octopus/assets/dependencies/libwmf-lite-0.2.13-2.fc39.x86_64.rpm
      - /opt/squirro/octopus/assets/dependencies/zbar-0.23.93-1.fc39.x86_64.rpm
      - /opt/squirro/octopus/assets/dependencies/zbar-libs-0.23.93-1.fc39.x86_64.rpm
    skip_broken: true
    state: present

- name: Install wheel files
  ansible.builtin.shell: |
    source /opt/squirro/virtualenv311/bin/activate
    pip install --no-deps --force-reinstall ../../../assets/dependencies/*.whl
    chown root:squirro -R /opt/squirro/virtualenv311
  changed_when: true
