mysql: use python3 with Debian 11 and later

This commit is contained in:
Jérémy Lecour 2021-05-01 22:17:17 +02:00 committed by Jérémy Lecour
parent 51d4ec1bb2
commit c5bb8f06ae
6 changed files with 70 additions and 7 deletions

View File

@ -19,6 +19,7 @@ The **patch** part changes incrementally at each release.
### Changed
* listupgrade: upstream release 21.06.3
* mysql: use python3 with Debian 11 and later
### Fixed

View File

@ -5,6 +5,16 @@
apt:
name: python-mysqldb
state: present
when: ansible_distribution_major_version is version('10', '<=')
tags:
- mysql
# dependency for mysql_user and mysql_db
- name: python3-mysqldb is installed (Ansible dependency)
apt:
name: python3-mysqldb
state: present
when: ansible_distribution_major_version is version('10', '>')
tags:
- mysql

View File

@ -6,13 +6,22 @@
when: mysql_variant == "mariadb"
# dependency for mysql_user and mysql_db
- name: python-mysqldb is installed (Ansible dependency)
apt:
name: python-mysqldb
state: present
when: ansible_distribution_major_version is version('10', '<=')
tags:
- mysql
- mysql
# dependency for mysql_user and mysql_db
- name: python3-mysqldb is installed (Ansible dependency)
apt:
name: python3-mysqldb
state: present
when: ansible_distribution_major_version is version('10', '>')
tags:
- mysql
- name: create a password for mysqladmin
command: "apg -n 1 -m 16 -M lcN"

View File

@ -1,13 +1,22 @@
---
# dependency for mysql_user and mysql_db
- name: python-mysqldb is installed (Ansible dependency)
apt:
name: python-mysqldb
state: present
when: ansible_distribution_major_version is version('10', '<=')
tags:
- mysql
- mysql
# dependency for mysql_user and mysql_db
- name: python3-mysqldb is installed (Ansible dependency)
apt:
name: python3-mysqldb
state: present
when: ansible_distribution_major_version is version('10', '>')
tags:
- mysql
- name: create a password for mysqladmin
command: "apg -n 1 -m 16 -M lcN"

View File

@ -1,5 +1,5 @@
---
- name: Install dependancy
- name: Install dependency
apt:
name:
- libpam-systemd
@ -14,7 +14,24 @@
- libmagickwand-dev
- libmagickcore-dev
- libmariadbclient-dev
- python-mysqldb
state: present
tags:
- redmine
# dependency for mysql_user and mysql_db
- name: python-mysqldb is installed (Ansible dependency)
apt:
name: python-mysqldb
state: present
when: ansible_distribution_major_version is version('10', '<=')
tags:
- redmine
# dependency for mysql_user and mysql_db
- name: python3-mysqldb is installed (Ansible dependency)
apt:
name: python3-mysqldb
state: present
when: ansible_distribution_major_version is version('10', '>')
tags:
- redmine

View File

@ -16,7 +16,24 @@
- php-apcu
- php-redis
- php-bcmath
- python-mysqldb
tags:
- nextcloud
# dependency for mysql_user and mysql_db
- name: python-mysqldb is installed (Ansible dependency)
apt:
name: python-mysqldb
state: present
when: ansible_distribution_major_version is version('10', '<=')
tags:
- nextcloud
# dependency for mysql_user and mysql_db
- name: python3-mysqldb is installed (Ansible dependency)
apt:
name: python3-mysqldb
state: present
when: ansible_distribution_major_version is version('10', '>')
tags:
- nextcloud