diff options
author | Toshio Kuratomi <a.badger@gmail.com> | 2018-10-24 08:22:44 -0700 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2018-10-24 10:33:19 -0700 |
commit | 748ea39ecd99bcb476dc460bfdd054567ef2bfc6 (patch) | |
tree | f01bc2c68bd1c9e77c00a381b398e88be3d177bb /test/integration/targets/setup_mysql_db | |
parent | 74ce8ce9354f4c9b527cbbd524fba45b145dbabd (diff) | |
download | ansible-748ea39ecd99bcb476dc460bfdd054567ef2bfc6.tar.gz |
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.
Diffstat (limited to 'test/integration/targets/setup_mysql_db')
-rw-r--r-- | test/integration/targets/setup_mysql_db/tasks/main.yml | 9 |
1 files changed, 9 insertions, 0 deletions
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}}" |