Skip to content
This repository was archived by the owner on Nov 17, 2020. It is now read-only.

Commit b6d65a5

Browse files
authored
Merge pull request #44 from shadinaif/shadinaif/python3-mysqldb-for-ubuntu-20.04
Use python3-mysqldb for Ubuntu 20.04
2 parents d68169d + 9c77d0b commit b6d65a5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tasks/mysql_secure_installation.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@
55
# package: pkg=python-mysqldb state=present
66

77

8-
- name: Install MySQL-python for Ansible
9-
apt: name=python-mysqldb state=present
10-
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
8+
- name: Install python3-mysqldb for Ansible
9+
apt: name=python3-mysqldb state=present
10+
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version >= '20.04'
1111

1212
- name: Install python-mysqldb for Ansible
13+
apt: name=python-mysqldb state=present
14+
when: ansible_distribution == 'Debian' or
15+
(ansible_distribution == 'Ubuntu' and ansible_distribution_version < '20.04')
16+
17+
- name: Install MySQL-python for Ansible
1318
yum: name=MySQL-python state=present
1419
when: ansible_os_family == 'RedHat' or ansible_os_family == 'Oracle Linux'
1520

0 commit comments

Comments
 (0)