RedHat: Ensure that conflicting MariaDB packages are removed

When the galera_client role is deployed along with other roles, some
of them may pull mariadb packages as a dependency for the services
they deploy. However, this role uses MariaDB packages from the upstream
repository which conflict with those provided by the EPEL or the RDO
ones so we need to ensure that they are gone before we install the
upstream ones.

Closes-Bug: #1739472
Change-Id: Ie1a2126986ee95671ece79374e1385846c8cce1a
This commit is contained in:
Markos Chandras 2018-02-06 13:22:36 +00:00 committed by Markos Chandras (hwoarang)
parent bd1f43f123
commit 72cc31a4d6
2 changed files with 13 additions and 0 deletions

View File

@ -13,6 +13,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Remove conflicting distro packages
package:
name: "{{ galera_client_mariadb_distro_packages_remove | default([]) }}"
state: absent
- include: "galera_client_install_{{ ansible_pkg_mgr }}.yml"
when:
- galera_client_package_install | bool

View File

@ -39,6 +39,14 @@ galera_client_distro_packages:
- openssl-devel
- python-devel
# Conflicting packages with those from the MariaDB repository
galera_client_mariadb_distro_packages_remove:
- mariadb-common
- mariadb-config
- mariadb-server
- mariadb-libs
- mariadb
# Galera GPG Keys
_galera_client_gpg_keys:
- key_name: 'RPM-GPG-KEY-MariaDB'