Add dnf support

This patch adds dnf support for CentOS.

Implements: blueprint centos-and-dnf
Change-Id: I2f839ca82b6b2b6fefb3b1237f6758c654226488
This commit is contained in:
Major Hayden
2017-08-02 13:17:31 -05:00
parent afa4dc0483
commit fe365f1e79
2 changed files with 6 additions and 5 deletions

View File

@@ -0,0 +1 @@
galera_install_yum.yml

View File

@@ -73,14 +73,14 @@
# This is why we force the metadata to be # This is why we force the metadata to be
# cleaned out whenever the repo config changes. # cleaned out whenever the repo config changes.
- name: Force the expiry of the repo metadata - name: Force the expiry of the repo metadata
command: "yum clean metadata" command: "{{ ansible_pkg_mgr }} clean metadata"
when: add_repos | changed when: add_repos | changed
tags: tags:
- galera-repos - galera-repos
- skip_ansible_lint - skip_ansible_lint
- name: Install percona repo - name: Install percona repo
yum: package:
pkg: "{{ galera_percona_xtrabackup_repo.repo }}" pkg: "{{ galera_percona_xtrabackup_repo.repo }}"
state: "{{ galera_percona_xtrabackup_repo.state }}" state: "{{ galera_percona_xtrabackup_repo.state }}"
register: install_packages register: install_packages
@@ -91,8 +91,8 @@
tags: tags:
- galera-pre-yum-packages - galera-pre-yum-packages
- name: Install galera_server role remote packages (yum) - name: Install galera_server role remote packages
yum: package:
name: "{{ item }}" name: "{{ item }}"
state: "{{ galera_server_package_state }}" state: "{{ galera_server_package_state }}"
with_items: with_items:
@@ -122,7 +122,7 @@
src: without-privatedevices.conf.j2 src: without-privatedevices.conf.j2
dest: "/etc/systemd/system/mariadb.service.d/without-privatedevices.conf" dest: "/etc/systemd/system/mariadb.service.d/without-privatedevices.conf"
when: when:
- ansible_pkg_mgr == 'yum' - ansible_pkg_mgr in ['yum', 'dnf']
- systemd_mysql_service.stat.exists - systemd_mysql_service.stat.exists
notify: notify:
- Reload the systemd daemon - Reload the systemd daemon