Fix mysql authentication errors

The mysql-server package on Ubuntu16.04 was recently updated to disallow
unauthenticated root user login over tcp/ip.  This, coupled with pymysql
using tcp/ip whenever host and port is specified causes us to fail to
connect to the database when testing Python3 on Ubuntu16.04.

The fix is to use the unix socket instead.
This commit is contained in:
Toshio Kuratomi
2018-10-24 08:22:44 -07:00
parent 74ce8ce935
commit 748ea39ecd
9 changed files with 378 additions and 83 deletions

View File

@@ -37,6 +37,15 @@
- 'default{{ python_suffix }}.yml'
paths: '../vars'
- name: Detect socket path
shell: >
echo "show variables like 'socket'\G" | mysql | grep 'Value: ' | sed 's/[ ]\+Value: //'
register: _socket_path
- name: Set socket path
set_fact:
mysql_socket: '{{ _socket_path["stdout"] }}'
- name: install mysqldb_test rpm dependencies
yum: name={{ item }} state=latest
with_items: "{{mysql_packages}}"