Skip to content

Commit 801a825

Browse files
retlehsswalkinshaw
andauthored
🐛 Fix MariaDB apt-key is deprecated failure (#1515)
* 🐛 Fix MariaDB apt-key is deprecated failure * Use apt_repository * Use apt_key module --------- Co-authored-by: Scott Walkinshaw <[email protected]>
1 parent d0c75a9 commit 801a825

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

roles/mariadb/defaults/main.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
mariadb_version: 10.6
2-
mariadb_keyserver: "hkp://keyserver.ubuntu.com:80"
3-
mariadb_keyserver_id: "0xF1656F24C74CD1D8"
42
mariadb_ppa: "deb https://mirror.rackspace.com/mariadb/repo/{{ mariadb_version }}/ubuntu {{ ansible_distribution_release }} main"
53

64
mariadb_client_package: mariadb-client

roles/mariadb/tasks/main.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
---
2-
- block:
3-
- name: Add MariaDB APT key
4-
apt_key:
5-
keyserver: "{{ mariadb_keyserver }}"
6-
id: "{{ mariadb_keyserver_id }}"
2+
- name: Add an Apt signing key, uses whichever key is at the URL
3+
ansible.builtin.apt_key:
4+
url: "https://mariadb.org/mariadb_release_signing_key.asc"
5+
state: present
76

8-
- name: Add MariaDB PPA
9-
apt_repository:
10-
repo: "{{ mariadb_ppa }}"
11-
update_cache: yes
7+
- name: Add MariaDB PPA
8+
apt_repository:
9+
repo: "{{ mariadb_ppa }}"
10+
update_cache: yes
1211

1312
- name: Install MySQL client
14-
apt:
13+
ansible.builtin.apt:
1514
name: "{{ mariadb_client_package }}"
1615
state: "{{ mariadb_client_package_state | default(apt_package_state) }}"
17-
cache_valid_time: "{{ apt_cache_valid_time }}"
16+
update_cache: true
1817

1918
- block:
2019
- name: Install MySQL server
21-
apt:
20+
ansible.builtin.apt:
2221
name: "{{ mariadb_server_package }}"
2322
state: "{{ mariadb_server_package_state | default(apt_package_state) }}"
2423
cache_valid_time: "{{ apt_cache_valid_time }}"

0 commit comments

Comments
 (0)