---
- name: Install dependencies
  apt:
    state: present
    name:
    - bzip2
    - php-gd
    - php-json
    - php-xml
    - php-mbstring
    - php-zip
    - php-curl
    - php-bz2
    - php-intl
    - php-gmp
    - php-apcu
    - php-redis
    - php-bcmath
  tags:
    - nextcloud

# 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:
    - nextcloud

# 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:
    - nextcloud

- include: user.yml

- include: archive.yml

- include: vhost.yml

- include: mysql.yml

- include: config.yml
