From 748ea39ecd99bcb476dc460bfdd054567ef2bfc6 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 24 Oct 2018 08:22:44 -0700 Subject: 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. --- test/integration/targets/setup_mysql_db/tasks/main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/integration/targets/setup_mysql_db') diff --git a/test/integration/targets/setup_mysql_db/tasks/main.yml b/test/integration/targets/setup_mysql_db/tasks/main.yml index 1bec93e73c..22c3f0ec7b 100644 --- a/test/integration/targets/setup_mysql_db/tasks/main.yml +++ b/test/integration/targets/setup_mysql_db/tasks/main.yml @@ -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}}" -- cgit v1.2.1