mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2026-02-03 23:01:49 +00:00
* Add new GPG key for apt repository of MySQL * Fix Oracle pubkey with an extra V at the start and missing newline after the header. * Cut package for unsupported python connector mysqlclient * Update cache to refresh installed GPG keys
40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
---
|
|
|
|
# We use the ubuntu2204 image provided by ansible-test.
|
|
|
|
# The GPG key is imported in the files folder from:
|
|
# https://dev.mysql.com/doc/refman/8.4/en/checking-gpg-signature.html
|
|
# Downloading the key on each iteration of the tests is too slow.
|
|
- name: Add MySQL GPG key to trusted keyring
|
|
ansible.builtin.copy:
|
|
src: files/mysql_pubkey.asc # Key B7B3B788A8D3785C Expire 2027-10-23
|
|
dest: /etc/apt/trusted.gpg.d/mysql.asc
|
|
owner: root
|
|
group: root
|
|
mode: '0644'
|
|
when:
|
|
- db_engine == 'mysql'
|
|
- db_version is version('8.4', '>=')
|
|
|
|
- name: Add MySQL 8.4 repository
|
|
ansible.builtin.apt_repository:
|
|
repo: deb http://repo.mysql.com/apt/ubuntu/ jammy mysql-8.4-lts mysql-tools
|
|
state: present
|
|
filename: mysql
|
|
when:
|
|
- db_engine == 'mysql'
|
|
- db_version is version('8.4', '>=')
|
|
|
|
- name: "{{ role_name }} | Requirements | Install Linux packages"
|
|
ansible.builtin.apt:
|
|
name:
|
|
- bzip2 # To test mysql_db dump compression
|
|
- "{{ db_engine }}-client"
|
|
update_cache: true
|
|
state: present
|
|
|
|
- name: "{{ role_name }} | Requirements | Install Python packages"
|
|
ansible.builtin.pip:
|
|
name:
|
|
- "{{ connector_name }}=={{ connector_version }}"
|
|
state: present
|