ansible-role-mysql
ansible-role-mysql copied to clipboard
CentOS 7 compatibility broken with version 5
With the following commit, https://github.com/geerlingguy/ansible-role-mysql/commit/d5955be135134f3b6b30cbbb7a7bc93fe0e836db#diff-bfe75a73e757559e6a512fbc1fb33aca5d0d420d061e93d93c1a8b0b2209a129L3, the compatibility with CentOS 7 is now broken.
The role will fail with:
TASK [geerlingguy.mysql : Run mysql --version] *********************************
fatal: [managed-node-1740405824]: FAILED! => {"changed": false, "cmd": "mariadb --version", "msg": "[Errno 2] No such file or directory", "rc": 2, "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
On those legacy systems, there is no /usr/bin/mariadb on the filesystem
$ rpm -qa | grep maria
mariadb-5.5.68-1.el7.x86_64
mariadb-libs-5.5.68-1.el7.x86_64
mariadb-server-5.5.68-1.el7.x86_64
mariadb-devel-5.5.68-1.el7.x86_64
Setting the mysql_daemon variable to mysql leads to other issues down the line:
TASK [geerlingguy.mysql : Ensure MySQL is started and enabled on boot.] ********
fatal: [managed-node-local-test]: FAILED! => {"changed": false, "msg": "Could not find the requested service mysql: host"}
Current workarounds I used:
- Freshly installed system, revert to 4.3.5
- Old systems, create a symbolic link,
ln -s /usr/bin/mysql /usr/bin/mariadb