Add support for CentOS 8 83/63583/2
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Thu, 2 Apr 2020 13:26:31 +0000 (06:26 -0700)
committerAndrew Grimberg <agrimberg@linuxfoundation.org>
Thu, 2 Apr 2020 17:15:08 +0000 (10:15 -0700)
Issue: RELENG-2823
Change-Id: I03b93c8bceb3c4be7ff27b75a30d4748488a4c05
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
tasks/main.yml
vars/CentOS-8.yml [new file with mode: 0644]

index cef5350..d09ebf7 100644 (file)
@@ -2,6 +2,8 @@
 - name: Include distro specific variables
   include_vars: "{{ item }}"
   with_first_found:
+    - '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml'
+    - '{{ ansible_distribution }}.yml'
     - '{{ ansible_os_family }}.yml'
 
 - name: Install Python
   become: true
 
 - name: Check pyenv global command
-  set_fact:
-    pyenv_command: 'pyenv global system {{ python38_version }} {{ python37_version }} {{ python36_version }} {{ python35_version }}'
-  when: ansible_distribution_version >= '18.04'
+  block:
+    - name: On Ubuntu >= 18.04
+      set_fact:
+        pyenv_command: 'pyenv global system {{ python38_version }} {{ python37_version }} {{ python36_version }} {{ python35_version }}'
+      when: ansible_distribution_version >= '18.04'
+    - name: On CentOS >= 8
+      set_fact:
+        pyenv_command: 'pyenv global {{ python38_version }} {{ python37_version }} {{ python36_version }} {{ python35_version }}'
+      when: ansible_distribution == 'CentOS' and ansible_distribution_major_version >= '8'
 
 - name: Install Python via pyenv
   environment:
diff --git a/vars/CentOS-8.yml b/vars/CentOS-8.yml
new file mode 100644 (file)
index 0000000..1e76d18
--- /dev/null
@@ -0,0 +1,8 @@
+---
+python_packages_distro:
+  - libffi-devel
+  - python36
+  - python36-devel
+  - python3-pip
+  - python3-setuptools
+  - python3-virtualenv