Skip to content

Commit 553e110

Browse files
authored
Merge pull request #88 from dotkernel/issue-87
Issue #87: Use MariaDB 11.4 official repo
2 parents b9fc1ab + 2a1bebc commit 553e110

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

wsl/roles/mariadb/tasks/main.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
11
---
2-
- name: Install the latest version of MariaDB
3-
command: "dnf install python3-mysqlclient mariadb-server -y"
4-
- name: Enable and start MariaDB service
5-
command: systemctl enable --now mariadb
2+
- name: Create MariaDB 11.4 repo file
3+
template:
4+
src: "{{ mariadb_repo_src }}"
5+
dest: "{{ mariadb_repo_dest }}"
6+
owner: "{{ config.system.username }}"
7+
group: "{{ config.system.username }}"
8+
- name: Install MariaDB 11.4
9+
ansible.builtin.dnf:
10+
name:
11+
- python3-mysqlclient
12+
- mariadb-server
13+
state: present
14+
- name: Enable and start MariaDB
15+
ansible.builtin.service:
16+
name: mariadb
17+
enabled: true
18+
state: started
619
- name: Set MariaDB root password
720
mysql_user:
821
login_user: root
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[mariadb]
2+
name = MariaDB
3+
baseurl = https://rpm.mariadb.org/11.4/almalinux/$releasever/$basearch
4+
gpgkey= https://rpm.mariadb.org/RPM-GPG-KEY-MariaDB
5+
gpgcheck=1

wsl/roles/mariadb/vars/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
mariadb_repo_src: MariaDB.repo.j2
3+
mariadb_repo_dest: /etc/yum.repos.d/MariaDB.repo

0 commit comments

Comments
 (0)