bertvv / ansible-role-mariadb

Install MariaDB on RHEL/CentOS 7 or Fedora.
https://galaxy.ansible.com/bertvv/mariadb/
Other
144 stars 108 forks source link

Fix for mysql module in newer ansibles #21

Closed dachinat closed 5 years ago

dachinat commented 5 years ago

Hello,

If you use newer Ansible (i.e.: ansible 2.7.4), then you'll encounter an error when using mysql ansible module.

TASK [bertvv.mariadb : Remove the test database] *******************************************************************************************************************************************************************************************
fatal: []: FAILED! => {"changed": false, "msg": "unable to find /root/.my.cnf. Exception message: (2003, \"Can't connect to MySQL server on 'localhost' ([Errno 111] Connection refused)\")"}

This is because there's an update on using it. It requires server to have .my.cnf file with credentials, however I think it's better to bypass this with supplying socket location. With options added in this PR, this error goes away.

bertvv commented 5 years ago

Good suggestion, thanks for this improvement!