Add Python 3.9, update all py versions 54/66854/2
authorEric Ball <eball@linuxfoundation.org>
Tue, 23 Feb 2021 03:23:58 +0000 (19:23 -0800)
committerEric Ball <eball@linuxfoundation.org>
Tue, 23 Feb 2021 03:26:10 +0000 (19:26 -0800)
This also includes changes to molecule/default/prepare.yml and
tox.ini that are required for compatibility with the latest version
of molecule.

Issue: IT-21563
Change-Id: I02820c1648b7a0c67b02b6b7d6cbbe171c52ee82
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
defaults/main.yml
molecule/default/prepare.yml
tasks/main.yml
tox.ini

index 8f4e000..3ab76ca 100644 (file)
@@ -1,9 +1,10 @@
 ---
-pyenv_version: v1.2.17
+pyenv_version: v1.2.23
 python34_version: 3.4.10
-python35_version: 3.5.8
-python36_version: 3.6.10
-python37_version: 3.7.7
-python38_version: 3.8.2
+python35_version: 3.5.10
+python36_version: 3.6.13
+python37_version: 3.7.10
+python38_version: 3.8.7
+python39_version: 3.9.1
 
 pyenv_command: 'pyenv global system {{python38_version}} {{python37_version}} {{python36_version}} {{python35_version}} {{python34_version}}'
index a80cccc..5ee898a 100644 (file)
@@ -3,9 +3,14 @@
   hosts: all
   gather_facts: true
   tasks:
+    - rpm_key:
+        state: present
+        key: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8
+      when: ansible_os_family == 'RedHat'
+      become: true
     - name: Install Fedora EPEL repo
       yum:
-        name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
+        name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm
         state: present
       when: ansible_os_family == 'RedHat'
       become: true
index d09ebf7..b0a9450 100644 (file)
   block:
     - name: On Ubuntu >= 18.04
       set_fact:
-        pyenv_command: 'pyenv global system {{ python38_version }} {{ python37_version }} {{ python36_version }} {{ python35_version }}'
+        pyenv_command: 'pyenv global system {{ python39_version }} {{ 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 }}'
+        pyenv_command: 'pyenv global {{ python39_version }} {{ python38_version }} {{ python37_version }} {{ python36_version }} {{ python35_version }}'
       when: ansible_distribution == 'CentOS' and ansible_distribution_major_version >= '8'
 
 - name: Install Python via pyenv
@@ -32,6 +32,7 @@
     PYTHON36_VERSION: '{{ python36_version }}'
     PYTHON37_VERSION: '{{ python37_version }}'
     PYTHON38_VERSION: '{{ python38_version }}'
+    PYTHON39_VERSION: '{{ python39_version }}'
   block:
     - name: 'Install pyenv {{ pyenv_version }}'
       git:
@@ -49,6 +50,8 @@
       command: pyenv install -s "$PYTHON37_VERSION"
     - name: 'Install Python {{ python38_version }}'
       command: pyenv install -s "$PYTHON38_VERSION"
+    - name: 'Install Python {{ python39_version }}'
+      command: pyenv install -s "$PYTHON39_VERSION"
     - name: Set pyenv global
       command: '{{ pyenv_command }}'
   become: true
diff --git a/tox.ini b/tox.ini
index a0f2e9b..76423c7 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -11,7 +11,7 @@ deps =
     ansible~=2.9.6
     ansible-lint~=4.2.0
     docker
-    molecule
+    molecule[docker]
     pytest
 passenv = *
 commands =