Problem:
After a fresh installation of mariadb 10.4 the root password could not be set using ansible.
When installing mariadb from the debian packages by mariadb (not the official debian packages), the password of root
is empty and a passwordless login is possible from localhost.
Still, ansible mysql_user
threw the following error:
failed: [XXX] (item=localhost) => {"ansible_loop_var": "item", "changed": false, "item": "localhost", "msg": "unable to connect to database, check login_user and login_password are correct or /root/.my.cnf has the credentials. Exception message: (1698, \"Access denied for user 'root'@'localhost'\")"}