]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ansible: Update slave playbooks for python2-less Ubuntu distros
authorDavid Galloway <dgallowa@redhat.com>
Wed, 20 May 2020 20:20:23 +0000 (16:20 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Wed, 20 May 2020 20:20:23 +0000 (16:20 -0400)
python2 is completely unavailable in Focal Fossa so it's time to split out those deps by Ubuntu version

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 a48e070fd7e328957886b6d1845bbde0f45b0d88..8c03c5b85333843f7eaaded6ca5a3ff5ac3ed858 100644 (file)
         - devscripts
         - pbuilder
         - pkg-config
-        - python-dev
-        - python-pip
-        - python-virtualenv
         - libtool
         - autotools-dev
         - automake
 
     - name: Install DEB requirements (<=16.04)
       apt:
-        name: dchroot
+        name: "{{ item }}"
         state: present
+      with_items:
+        - dchroot
+        - python-pip
+        - python-dev
+        - python-virtualenv
       when:
         - ansible_pkg_mgr  == "apt"
         - ansible_distribution_major_version|int <= 16
index b4fd1db05110537eee9770cc74023bfa2f4ede41..4c6768fc4090c4a1567096bbf661e6369586d275 100644 (file)
         update_cache: yes
       when: ansible_pkg_mgr  == "apt"
 
-    - name: Install DEB requirements
+    - name: Install universal DEB requirements
       apt:
         name: "{{ item }}"
         state: present
       with_items:
         - git
-        - python-dev
-        - python-pip
-        - python-virtualenv
         - libtool
         - libssl-dev
         - libffi-dev
         - vagrant
       when: ansible_pkg_mgr  == "apt"
 
+    - name: Install DEB requirements (>=18.04)
+      apt:
+        name: "{{ item }}"
+        state: present
+      with_items:
+        - schroot
+        - python3-dev
+        - python3-pip
+        - python3-virtualenv
+      when:
+        - ansible_pkg_mgr  == "apt"
+        - ansible_distribution_major_version|int >= 18
+
+    - name: Install DEB requirements (<=16.04)
+      apt:
+        name: "{{ item }}"
+        state: present
+      with_items:
+        - dchroot
+        - python-pip
+        - python-dev
+        - python-virtualenv
+      when:
+        - ansible_pkg_mgr  == "apt"
+        - ansible_distribution_major_version|int <= 16
+
     - name: install requirements without epel
       yum:
         name: "{{ item }}"
index 0310fcf68b05652b6af7c3cdf503ae358c0a6d00..926c001ab044a6d435473bef9133db7814f5069e 100644 (file)
@@ -81,9 +81,6 @@
         state: present
       with_items:
         - git
-        - python-dev
-        - python-pip
-        - python-virtualenv
         - libtool
         - libssl-dev
         - libffi-dev
         - default-jre
       when: ansible_os_family == "Debian"
 
+    - name: Install DEB requirements (>=18.04)
+      apt:
+        name: "{{ item }}"
+        state: present
+      with_items:
+        - schroot
+        - python3-dev
+        - python3-pip
+        - python3-virtualenv
+      when:
+        - ansible_pkg_mgr  == "apt"
+        - ansible_distribution_major_version|int >= 18
+
+    - name: Install DEB requirements (<=16.04)
+      apt:
+        name: "{{ item }}"
+        state: present
+      with_items:
+        - dchroot
+        - python-pip
+        - python-dev
+        - python-virtualenv
+      when:
+        - ansible_pkg_mgr  == "apt"
+        - ansible_distribution_major_version|int <= 16
+
     - name: install requirements without epel
       yum:
         name: "{{ item }}"
index 656b05931382ca8e5f4314fd87d24a9e393858f3..fd64cc6a44961127095803035670ecdbdd7261bd 100644 (file)
         - devscripts
         - pbuilder
         - pkg-config
-        - python-dev
-        - python-pip
-        - python-virtualenv
         - libtool
         - libssl-dev
         - libffi-dev
 
     - name: Install DEB requirements (<=16.04)
       apt:
-        name: dchroot
+        name: "{{ item }}"
         state: present
+      with_items:
+        - dchroot
+        - python-pip
+        - python-dev
+        - python-virtualenv
       when:
         - ansible_pkg_mgr  == "apt"
         - ansible_distribution_major_version|int <= 16