]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ansible: Update playbooks for CentOS8 compatibility 1415/head
authorDavid Galloway <dgallowa@redhat.com>
Thu, 17 Oct 2019 18:07:57 +0000 (14:07 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Thu, 17 Oct 2019 18:07:57 +0000 (14:07 -0400)
Signed-off-by: David Galloway <dgallowa@redhat.com>
ansible/examples/slave.yml
ansible/examples/slave_libvirt.yml
ansible/examples/slave_libvirt_static.yml
ansible/examples/slave_static.yml

index 835403a3d0332f77492e8f5661beeef8b53b2726..320f54265f0061a3655dc291faea3adae0d7cc4a 100644 (file)
       when: ansible_os_family == "RedHat"
 
     - name: Install RPM requirements
-      yum:
+      package:
         name: "{{ item }}"
         state: present
       with_items:
         - rpmdevtools
         - openssl-devel
         - libffi-devel
-      when: ansible_pkg_mgr  == "yum"
+      when: ansible_os_family == "RedHat"
 
-    - name: install packages from epel
+    - name: install packages from epel (<=7)
       yum:
         name: "{{ item }}"
         state: present
       with_items:
         - jq
         - python-pip
-      when: ansible_os_family == "RedHat"
+      when:
+        - ansible_os_family == "RedHat"
+        - ansible_distribution_major_version|int <= 7
+
+    - name: install packages from epel (>=8)
+      dnf:
+        name: "{{ item }}"
+        state: present
+        enablerepo: epel
+        update_cache: yes
+      with_items:
+        - jq
+        - python3-pip
+      when:
+        - ansible_os_family == "RedHat"
+        - ansible_distribution_major_version|int >= 8
 
     # Run the equivalent of "apt-get update" as a separate step
     - apt:
index 7725192c43129560d93307212739c515606a8d6e..03ecccfe27f972f4c12431392712a759293cf285 100644 (file)
@@ -1,4 +1,5 @@
 ---
+# This playbook needs to be updated for EL8 compatibility
 
 - hosts: all
   become: true
index 44cfeef7662d39a22b24a667c21adb425533d4fd..76c77b9212bba27fcd4b30609afe22aeb0824116 100644 (file)
@@ -2,6 +2,8 @@
 # This playbook is used to configure static libvirt&&vagrant slaves.
 # Ubuntu >= 16.04 and CentOS 7.3 are the only tested distros
 #
+# This playbook needs to be updated for EL8 compatibility
+#
 # Example usage:
 # On a baremetal node already configured by the github.com/ceph/ceph-cm-ansible common role,
 # `cd ceph-build/ansible && cp examples/slave_libvirt_static.yml .` then:
index 326fff5cb77a2e8c368bf31dadb1c6b0b328fdb9..cfb1e8ad09ee34b1a450ab5f2983d15b97982888 100644 (file)
@@ -93,9 +93,9 @@
         mode: 0644
       when: ansible_pkg_mgr  == "yum"
 
-    - name: Install RPM requirements
+    - name: Install RPM requirements (All distro versions)
       sudo: yes
-      yum:
+      package:
         name: "{{ item }}"
         state: present
         update_cache: yes
         - epel-release
         - java-1.8.0-openjdk
         - git
-        - python-pip
-        - python-virtualenv
         - libtool
         #- rpm-sign
         - autoconf
         - rpmdevtools
         - openssl-devel
         - libffi-devel
-      when: ansible_pkg_mgr  == "yum"
+      when:
+        - ansible_os_family == "RedHat"
+
+    - name: Install RPM requirements (<=7)
+      sudo: yes
+      package:
+        name: "{{ item }}"
+        state: present
+        update_cache: yes
+      with_items:
+        - python-pip
+        - python-virtualenv
+      when:
+        - ansible_os_family == "RedHat"
+        - ansible_distribution_major_version|int <= 7
+
+    - name: Install RPM requirements (>=8)
+      sudo: yes
+      package:
+        name: "{{ item }}"
+        state: present
+        update_cache: yes
+      with_items:
+        - python3-pip
+        - python3-virtualenv
+      when:
+        - ansible_os_family == "RedHat"
+        - ansible_distribution_major_version|int >= 8
 
     - name: install packages from epel
-      yum:
+      package:
         name: jq
         state: present
         enablerepo: epel