Skip to content

Commit

Permalink
Allow to upgrade packages when allowed by mariadb_upgrade (#226)
Browse files Browse the repository at this point in the history
* Allow to upgrade packages when allowed by mariadb_upgrade

* Refactor mariadb package install for debian/redhat

* Fix eof for tasks/mariadb_packages_install.yml
  • Loading branch information
elcomtik authored Oct 4, 2024
1 parent d93e52b commit a83a130
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
6 changes: 1 addition & 5 deletions tasks/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,4 @@
become: true
when: mariadb_config_overrides is defined

- name: debian | installing mariadb-galera packages
ansible.builtin.apt:
name: "{{ (galera_sst_method == 'mariabackup') | ternary( mariadb_packages | union( mariabackup_packages ), mariadb_packages ) }}"
state: "present"
become: true
- ansible.builtin.import_tasks: mariadb_packages_install.yml
7 changes: 7 additions & 0 deletions tasks/mariadb_packages_install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
- name: mariadb_packages_install | installing mariadb-galera packages
ansible.builtin.package:
name: "{{ (galera_sst_method == 'mariabackup') | ternary( mariadb_packages | union( mariabackup_packages ), mariadb_packages ) }}"
state: "{{ mariadb_upgrade | ternary( 'latest', 'present' ) }}"
update_cache: true
become: true
7 changes: 1 addition & 6 deletions tasks/redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,7 @@
become: true
when: mariadb_config_overrides is defined

- name: redhat | installing mariadb mysql
ansible.builtin.yum:
name: "{{ (galera_sst_method == 'mariabackup') | ternary( mariadb_packages | union( mariabackup_packages ), mariadb_packages ) }}"
state: "present"
update_cache: true
become: true
- ansible.builtin.import_tasks: mariadb_packages_install.yml

- name: redhat | remove migrated-from-my.cnf-settings.conf that is causing MariaDB to not start
ansible.builtin.file:
Expand Down

0 comments on commit a83a130

Please sign in to comment.