Skip to content

Commit 31ef16d

Browse files
committed
Fixes geerlingguy#344: Explicitly set debian/ubuntu python 3 mysql library.
1 parent b33c4b7 commit 31ef16d

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ The formats of these are the same as in the `mysql_user` module.
8484

8585
(RedHat/CentOS only) If you have enabled any additional repositories (might I suggest geerlingguy.repo-epel or geerlingguy.repo-remi), those repositories can be listed under this variable (e.g. `remi,epel`). This can be handy, as an example, if you want to install later versions of MySQL.
8686

87-
mysql_python_package_debian: ''
87+
mysql_python_package_debian: python3-mysqldb
8888

89-
(Ubuntu/Debian only) If you need to explicitly set the MySQL Python package, you can set it here. If not set, it will default to `python-mysqldb` for Python 2 and `python3-mysqldb` for Python 3.
89+
(Ubuntu/Debian only) If you need to explicitly override the MySQL Python package, you can set it here. Set this to `python-mysqldb` if using older distributions running Python 2.
9090

9191
mysql_port: "3306"
9292
mysql_bind_address: '0.0.0.0'

molecule/default/converge.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
hosts: all
44
become: true
55

6-
vars:
7-
mysql_python_package_debian: python3-mysqldb
8-
96
roles:
107
- role: geerlingguy.mysql
118

tasks/setup-Debian.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77
apt: update_cache=yes
88
when: not mysql_installed.stat.exists
99

10-
- name: Determine required MySQL Python libraries.
11-
set_fact:
12-
mysql_python_package_debian: "{% if 'python3' in ansible_python_interpreter|default('') %}python3-mysqldb{% else %}python-mysqldb{% endif %}"
13-
when: mysql_python_package_debian is not defined
14-
1510
- name: Ensure MySQL Python libraries are installed.
1611
apt:
1712
name: "{{ mysql_python_package_debian }}"

0 commit comments

Comments
 (0)