---
- name: Install dependency
  apt:
    name:
      - libpam-systemd
      - imagemagick
      - git-core
      - git-svn
      - gcc
      - build-essential
      - libxml2-dev
      - libxslt1-dev
      - libssl-dev
      - libmagickwand-dev
      - libmagickcore-dev
      - libmariadbclient-dev
    state: present
  tags:
    - redmine

# dependency for mysql_user and mysql_db
- name: python-mysqldb is installed (Ansible dependency)
  apt:
    name: python-mysqldb
    state: present
  when: ansible_distribution_major_version is version('10', '<=')
  tags:
    - redmine

# dependency for mysql_user and mysql_db
- name: python3-mysqldb is installed (Ansible dependency)
  apt:
    name: python3-mysqldb
    state: present
  when: ansible_distribution_major_version is version('10', '>')
  tags:
    - redmine