]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
install centos or rhel dependencies depending on ansible_distribution
authorAlfredo Deza <adeza@redhat.com>
Wed, 2 Mar 2016 23:05:37 +0000 (18:05 -0500)
committerAlfredo Deza <adeza@redhat.com>
Wed, 2 Mar 2016 23:05:37 +0000 (18:05 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
roles/ceph-common/tasks/installs/install_on_redhat.yml

index 3717fd7cad945b468ca88f265b9d35d93b6256e4..34aa0160f199219af7901be2ee85fde1df313260 100644 (file)
@@ -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