From 21166168e3fcc1a658ea03f3b9279e90103840c8 Mon Sep 17 00:00:00 2001 From: Daniel Gryniewicz Date: Thu, 16 Jun 2016 10:06:31 -0400 Subject: [PATCH] Add DNF for RedHat Signed-off-by: Daniel Gryniewicz --- .../tasks/installs/install_on_redhat.yml | 15 ++++++++++++--- roles/ceph-osd/tasks/pre_requisite.yml | 16 +++++++++++++--- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/roles/ceph-common/tasks/installs/install_on_redhat.yml b/roles/ceph-common/tasks/installs/install_on_redhat.yml index 3e5e91f32..e51a1b440 100644 --- a/roles/ceph-common/tasks/installs/install_on_redhat.yml +++ b/roles/ceph-common/tasks/installs/install_on_redhat.yml @@ -1,5 +1,5 @@ --- -- name: install dependencies +- name: install redhat dependencies via yum yum: name: "{{ item }}" state: present @@ -8,7 +8,16 @@ - ansible_distribution == "RedHat" - ansible_pkg_mgr == "yum" -- name: install dependencies +- name: install redhat dependencies via dnf + dnf: + name: "{{ item }}" + state: present + with_items: redhat_package_dependencies + when: + - ansible_distribution == "RedHat" + - ansible_pkg_mgr == "dnf" + +- name: install centos dependencies via yum yum: name: "{{ item }}" state: present @@ -17,7 +26,7 @@ - ansible_distribution == "CentOS" - ansible_pkg_mgr == "yum" -- name: install dependencies +- name: install centos dependencies via dnf dnf: name: "{{ item }}" state: present diff --git a/roles/ceph-osd/tasks/pre_requisite.yml b/roles/ceph-osd/tasks/pre_requisite.yml index f93247cfa..64430f0f8 100644 --- a/roles/ceph-osd/tasks/pre_requisite.yml +++ b/roles/ceph-osd/tasks/pre_requisite.yml @@ -1,15 +1,25 @@ --- -- name: install dependencies +- name: install debian dependencies apt: pkg: parted state: present when: ansible_os_family == 'Debian' -- name: install dependencies +- name: install redhat dependencies via yum yum: name: parted state: present - when: ansible_os_family == 'RedHat' + when: + - ansible_os_family == 'RedHat' + - ansible_pkg_mgr == "yum" + +- name: install redhat rependencies via dnf + dnf: + name: parted + state: present + when: + - ansible_os_family == 'RedHat' + - ansible_pkg_mgr == "dnf" - name: create bootstrap-osd directory file: