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
No known key found for this signature in database
GPG Key ID: 737051E0C1011FB1
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
# cleaned out whenever the repo config changes.
- name: Force the expiry of the repo metadata
command: "yum clean metadata"
command: "{{ ansible_pkg_mgr }} clean metadata"
when: add_repos | changed
tags:
- galera-repos
- skip_ansible_lint
- name: Install percona repo
yum:
package:
pkg: "{{ galera_percona_xtrabackup_repo.repo }}"
state: "{{ galera_percona_xtrabackup_repo.state }}"
register: install_packages
@ -91,8 +91,8 @@
tags:
- galera-pre-yum-packages
- name: Install galera_server role remote packages (yum)
yum:
- name: Install galera_server role remote packages
package:
name: "{{ item }}"
state: "{{ galera_server_package_state }}"
with_items:
@ -122,7 +122,7 @@
src: without-privatedevices.conf.j2
dest: "/etc/systemd/system/mariadb.service.d/without-privatedevices.conf"
when:
- ansible_pkg_mgr == 'yum'
- ansible_pkg_mgr in ['yum', 'dnf']
- systemd_mysql_service.stat.exists
notify:
- Reload the systemd daemon