---
- name: Install all the {{ ansible_distribution }} mariadb packages
  dnf:
    name: "{{ mariadb_packages }}"
    state: present

- name: Download ProxySQL
  get_url:
    url:  "{{ proxySQL_url }}"
    dest: /tmp/{{ proxySQL_rpm }}
    checksum: "sha256:{{ proxySQL_sha256 }}"

- name: Install ProxySQL 
  yum:
    name: 
      - /tmp/{{ proxySQL_rpm }}
      - sysbench
    state: present

- name: ProxySQL service
  service:
    name: proxysql
    state: started
    enabled: yes 
