Install the latest mysqld_exporter version with ansible.
There are only two variables, both are required: mysqld_exporter_password
for the
exporter user on the database and mysqld_exporter_db_root_password
to be able to create said user.
If you do not want to change the defaults, just add the role to your playbook:
- hosts: all
become: true
roles:
- role: elan.monitoring_mysqld_exporter
vars:
mysqld_exporter_password: 1234
mysqld_exporter_db_root_password: 5678