Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix MariaDB apt-key is deprecated failure #1515

Merged
merged 3 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions roles/mariadb/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
mariadb_version: 10.6
mariadb_keyserver: "hkp://keyserver.ubuntu.com:80"
mariadb_keyserver_id: "0xF1656F24C74CD1D8"
mariadb_ppa: "deb https://mirror.rackspace.com/mariadb/repo/{{ mariadb_version }}/ubuntu {{ ansible_distribution_release }} main"

mariadb_client_package: mariadb-client
Expand Down
23 changes: 11 additions & 12 deletions roles/mariadb/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
---
- block:
- name: Add MariaDB APT key
apt_key:
keyserver: "{{ mariadb_keyserver }}"
id: "{{ mariadb_keyserver_id }}"
- name: Add an Apt signing key, uses whichever key is at the URL
ansible.builtin.apt_key:
url: "https://mariadb.org/mariadb_release_signing_key.asc"
state: present

- name: Add MariaDB PPA
apt_repository:
repo: "{{ mariadb_ppa }}"
update_cache: yes
- name: Add MariaDB PPA
apt_repository:
repo: "{{ mariadb_ppa }}"
update_cache: yes

- name: Install MySQL client
apt:
ansible.builtin.apt:
name: "{{ mariadb_client_package }}"
state: "{{ mariadb_client_package_state | default(apt_package_state) }}"
cache_valid_time: "{{ apt_cache_valid_time }}"
update_cache: true

- block:
- name: Install MySQL server
apt:
ansible.builtin.apt:
name: "{{ mariadb_server_package }}"
state: "{{ mariadb_server_package_state | default(apt_package_state) }}"
cache_valid_time: "{{ apt_cache_valid_time }}"
Expand Down
Loading