From 44e68923d1697bedb847de2425bc90cb2c0eac78 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Wed, 2 Mar 2016 18:05:37 -0500 Subject: [PATCH] install centos or rhel dependencies depending on ansible_distribution Signed-off-by: Alfredo Deza --- .../tasks/installs/install_on_redhat.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/roles/ceph-common/tasks/installs/install_on_redhat.yml b/roles/ceph-common/tasks/installs/install_on_redhat.yml index 3717fd7ca..34aa0160f 100644 --- a/roles/ceph-common/tasks/installs/install_on_redhat.yml +++ b/roles/ceph-common/tasks/installs/install_on_redhat.yml @@ -4,14 +4,27 @@ name: "{{ item }}" state: present with_items: redhat_package_dependencies - when: ansible_pkg_mgr == "yum" + when: + ansible_distribution == "RedHat" and + ansible_pkg_mgr == "yum" + +- name: install dependencies + yum: + name: "{{ item }}" + state: present + with_items: centos_package_dependencies + when: + ansible_distribution == "CentOS" and + ansible_pkg_mgr == "yum" - name: install dependencies dnf: name: "{{ item }}" state: present - with_items: redhat_package_dependencies - when: ansible_pkg_mgr == "dnf" + with_items: centos_package_dependencies + when: + ansible_distribution == "CentOS" and + ansible_pkg_mgr == "dnf" - name: configure ceph yum repository include: redhat_ceph_repository.yml -- 2.39.5