---

- name: Install MySQL packages
  apt:
    name:
      - mariadb-server
      - mariadb-client
    update_cache: yes
    state: present
  tags:
  - mysql
  - packages

- name: Install MySQL dev packages
  apt:
    name: default-libmysqlclient-dev
    update_cache: yes
    state: present
  tags:
  - mysql
  - packages
  when: mysql_install_libclient | bool

- name: MySQL is started
  service:
    name: mysql
    state: started
  tags:
  - mysql
  - services

- name: apg package is installed
  apt:
    name: apg
    state: present
  tags:
  - mysql
  - packages
