Skip to content

Commit

Permalink
Galera: Make Galera Rocky 9 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
quartje committed Oct 9, 2024
1 parent fd55a35 commit 5990140
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
17 changes: 8 additions & 9 deletions roles/galera/tasks/cluster_nodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,18 @@
state: present
ignoreerrors: yes

# Add MariaDB repo and key
- name: Add MariaDB.org repository CentOS7
template:
src: "mariadb.repo.j2"
dest: "/etc/yum.repos.d/mariadb.repo"
when: ansible_distribution_major_version == '7'

- name: Add MariaDB.org repository Rocky 8
template:
src: "mariadb.repo.rocky8.j2"
dest: "/etc/yum.repos.d/mariadb.repo"
when: ansible_distribution_major_version == '8'

- name: Add MariaDB.org repository Rocky 9
template:
src: "mariadb.repo.rocky9.j2"
dest: "/etc/yum.repos.d/mariadb.repo"
when: ansible_distribution_major_version == '9'

- name: Install MariaDB, Galera, socat, python3-PyMySQL
yum:
name:
Expand Down Expand Up @@ -215,7 +214,7 @@
mysql_user:
name: "{{ mariadb_cluster_user }}"
password: "{{ mariadb_cluster_password }}"
priv: "*.*:GRANT RELOAD,PROCESS,LOCK TABLES,BINLOG MONITOR"
priv: "*.*:RELOAD,PROCESS,LOCK TABLES,BINLOG MONITOR"
state: present
login_user: root
login_password: "{{ mariadb_root_password }}"
Expand All @@ -227,7 +226,7 @@
mysql_user:
name: "{{ mariadb_backup_user }}"
password: "{{ mariadb_backup_password }}"
priv: "*.*:GRANT RELOAD,PROCESS,LOCK TABLES,BINLOG MONITOR,CONNECTION ADMIN"
priv: "*.*:RELOAD,PROCESS,LOCK TABLES,BINLOG MONITOR,CONNECTION ADMIN"
state: present
login_user: root
login_password: "{{ mariadb_root_password }}"
Expand Down
7 changes: 7 additions & 0 deletions roles/galera/templates/mariadb.repo.rocky9.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.6/rhel9-amd64
module_hotfixes=1
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

0 comments on commit 5990140

Please sign in to comment.