ansible/roles/python-install.git
14 months agoFix: Install python 3.10.x on CentOS 7 55/72655/4
Anil Belur [Sun, 18 Feb 2024 06:47:05 +0000 (16:47 +1000)]
Fix: Install python 3.10.x on CentOS 7

Python 3.10.x is a pre-requiste for the ansible version 9.2.0
used fro the packer jobs. However the version of python 3.10.x
requires openssl11 libs and headers to be installed so that pyenv
install builds the required runtime dependencies.

ERROR: "ModuleNotFoundErrorr No module named '_ssl'"
"The Python ssl extension was not compiled. Missing the OpenSSL lib?"

Ref: https://github.com/pyenv/pyenv/wiki/Common-build-problems
Change-Id: Ib1c51882f057b7cf2c3a3c9307d524c9cf45b3a2
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
15 months agoFix: Update python-install to build with latest 31/72631/11
Anil Belur [Fri, 9 Feb 2024 03:55:23 +0000 (13:55 +1000)]
Fix: Update python-install to build with latest

Modernize the molecule test formats and update the role.
Update tox and pre-commit dependencies to build with latest
versions of ansible and molecule.

Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Change-Id: Ia22bb1e41bad236bd3daea25a9f66fe7157675ee
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
15 months agoFix: Rename .github/workflow to workflows 20/72620/1
Anil Belur [Tue, 6 Feb 2024 03:11:28 +0000 (13:11 +1000)]
Fix: Rename .github/workflow to workflows

Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Change-Id: I96c06da4f37acb19e2696540ab700e86b4179612

15 months agoChore: Update pre-commit dependencies to latest 78/72578/1
Anil Belur [Mon, 29 Jan 2024 11:21:53 +0000 (21:21 +1000)]
Chore: Update pre-commit dependencies to latest

ERROR! the role 'python-install' was not found in <>
The error appears to be in '': line 5, column 7, but may
be elsewhere in the file depending on the exact syntax
problem.

Update role name to match the role path on GHA and
Jenkins jobs.

Ref: https://github.com/ansible/molecule/issues/1042
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Change-Id: Ic1d9998cd20c4bbfb95c384b5cd9b7079ec45a9c

2 years agoFeat: Add v3.10.x and re-factor code 03/70503/10
Anil Belur [Mon, 22 Aug 2022 07:38:36 +0000 (17:38 +1000)]
Feat: Add v3.10.x and re-factor code

- Add new version 3.10.x support.
- Bump 3.8.x, 3.9.x to the latest update.
- Bump the pyenv version to v2.3.3.
- Remove deprecated versions of python:
  (3.4.10, 3.5.10, 3.6.13, 3.7.10)
- Refactor the python-install role to address 'line too
   long' error while building the pyenv command.
- Install compact-openssl10 dependencies for python 3.10
  ERROR: The Python ssl extension was not compiled. Missing the
  OpenSSL lib?
  The compat-openssl libs are available only for CentOS8, so python
  3.10x will be available for >= CentOS8.
- Include libssl-dev required for building Ubuntu {18,20}.04

Issue-ID: RELENG-4357
Ref: https://github.com/pyenv/pyenv/issues/950
Change-Id: I3fe4fed872a43bf21a07fefc6c161b143f306ca2
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
2 years agoChore: Update pre-commit dependencies 21/70521/1
Anil Belur [Mon, 22 Aug 2022 08:09:07 +0000 (18:09 +1000)]
Chore: Update pre-commit dependencies

Change-Id: Ia88d5168c54d19720ca3390e51753a567aaba8fe
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
3 years agoChore!: Update base version of python to 3.8 35/69935/11
Anil Belur [Thu, 31 Mar 2022 03:47:04 +0000 (13:47 +1000)]
Chore!: Update base version of python to 3.8

- Python 3.6 is EOL, update to 3.8.
- Remove Ubuntu 16.04 from the molecule, since Ubuntu 16.04 is EOL.
- Update tox and molecule depenencies.

Change-Id: I4131008a04c8feaf25b239bd4054709a7d797a4f
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
4 years agoAdd Python 3.9, update all py versions 54/66854/2
Eric Ball [Tue, 23 Feb 2021 03:23:58 +0000 (19:23 -0800)]
Add Python 3.9, update all py versions

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>
4 years agoAdd tests for CentOS 8 and Ubunt 18.04 46/63846/7
Thanh Ha [Thu, 30 Apr 2020 23:50:57 +0000 (19:50 -0400)]
Add tests for CentOS 8 and Ubunt 18.04

These other are supported or appear to be so we should make sure
to also test them. This also adds zlib1g-dev to ensure that Ubuntu
18.04 picks it up as it appears to be missing in test builds.

Change-Id: I0068eb99254b5f7f651fee77178d9615a69e3d45
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
4 years agoRun an apt update before installing Git 93/64593/2
Thanh Ha [Tue, 21 Jul 2020 20:06:25 +0000 (16:06 -0400)]
Run an apt update before installing Git

Fix "git is not available" error that is appear in Ubuntu builds
which appears to be due to apt cache not being updated prior to
running install commands.

Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I836ff20f6bf6f922e91ecf209e87a09f81a22795

5 years agoAdd support for Ubuntu 20.04 45/63845/3
Thanh Ha [Thu, 30 Apr 2020 23:49:35 +0000 (19:49 -0400)]
Add support for Ubuntu 20.04

Ubuntu 20.04 is dropping Python 2 support so many of the packages are
either removed or deprecated, need a new list to maintain packages
that work.

Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I8a7d0a7fc5ad439d7c1da5c2ba0fc46cd425d3f0

5 years agoAdd support for CentOS 8 83/63583/2
Andrew Grimberg [Thu, 2 Apr 2020 13:26:31 +0000 (06:26 -0700)]
Add support for CentOS 8

Issue: RELENG-2823
Change-Id: I03b93c8bceb3c4be7ff27b75a30d4748488a4c05
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
5 years agoUpgrade pyenv and python versions 20/63120/7
Tommy Carpenter [Thu, 13 Feb 2020 15:33:34 +0000 (10:33 -0500)]
Upgrade pyenv and python versions

upgrade pyenv to 1.2.17
upgrade python to 3.5.8, 3.6.10, 3.7.7
add python 3.8.2

Issue-ID: RELENG-2736
Change-Id: Ie4373fab05d1cf38c7f3f4a835517b2a46fe50bf
Signed-off-by: Tommy Carpenter <tc677g@att.com>
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
5 years agoUpdate molecule tests for v3 24/63424/1
Eric Ball [Mon, 16 Mar 2020 17:32:40 +0000 (10:32 -0700)]
Update molecule tests for v3

The lint section is now a single shell script.
playbook.yml is now named converge.yml.
docker_image_facts renamed to docker_image_info.
path, dockerfile, and force params for docker_image have changed
name/section, and source is now required.
Updated tox requirements.

Issue: RELENG-2721
Change-Id: I09a5af5129ce03166fd3af56605960afbd0f6ee5
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
5 years agopython3-virtualenv != python3-venv 41/61841/1
Aric Gardner [Wed, 25 Sep 2019 20:29:38 +0000 (16:29 -0400)]
python3-virtualenv != python3-venv

python3-virtualenv provides the virtualenv command.
python3-venv needed for python -m venv

Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: Ifcc76003365d85395fb89a15257097a9f194d73f

5 years agoUbuntu: Install all required libraries for Pyenv 87/61787/2
Aric Gardner [Thu, 19 Sep 2019 19:16:42 +0000 (15:16 -0400)]
Ubuntu: Install all required libraries for Pyenv

https://github.com/pyenv/pyenv/wiki/Common-build-problems

ISSUE: IT-17316
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I6c3c2f4331abb92b85140dd333568379ceefc3ea

5 years agoAdd python36 to centos builders 12/61712/4
Aric Gardner [Thu, 12 Sep 2019 20:20:20 +0000 (16:20 -0400)]
Add python36 to centos builders

python 34 is EOL, remove it.

Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: Ib8e5ad13b52002b363fa941cdbdd01cdc4f71a55

5 years agoUpgrade python 3.x to 2019 releases 24/61624/2
Lott, Christopher (cl778h) [Fri, 6 Sep 2019 12:59:44 +0000 (08:59 -0400)]
Upgrade python 3.x to 2019 releases

Pyenv to version 1.2.13
Python to versions 3.4.10, 3.5.7, 3.6.9, 3.7.4

Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: Ibf8d278a3c03c0074f33ac2fb6496268d80aa5f4

5 years agoConfigure basepython to python3 02/16702/1
Thanh Ha [Tue, 27 Aug 2019 19:03:46 +0000 (15:03 -0400)]
Configure basepython to python3

More and more libraries that we are pulling in require Python 3 so
to avoid having to play the pin dependencies whack-a-mole game let's
bump or base python where possible to python3.

Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I5833692c398521fd9d6bf37f1888cff42f5977d7

5 years agoFix conditionals so role works with newer Ubuntu 06/16606/2
Thanh Ha [Tue, 20 Aug 2019 02:19:54 +0000 (22:19 -0400)]
Fix conditionals so role works with newer Ubuntu

Fix conditionals so that the role works with Ubuntu versions
newer than 18.04 too considering the conditionals isn't specific
to 18.04 but rather 18.04 and newer.

Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I0a943d797658c11f5f04fb2530369c05031b9e25

5 years agoUse Python 3 for molecule tests 07/16607/1
Thanh Ha [Tue, 20 Aug 2019 02:32:52 +0000 (22:32 -0400)]
Use Python 3 for molecule tests

PyTest 5.0 requires Python 3.5+ so let's update.

Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: Ica796ce33dd79fc7e42d4c2795a48f4528ca5e6f

6 years agoUse pre-commit instead of Coala 12/15612/4
Thanh Ha [Sat, 11 May 2019 01:24:47 +0000 (21:24 -0400)]
Use pre-commit instead of Coala

Considering that all we're using Coala for is for the GitCommitBear
let's drop Coala in favor of pre-commit as it's faster and more
convenient.

Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I7a432702e449310fc1af60fa24bea35b5692f4e0

6 years agoFix yamllint: variable spaces before and after 18/15618/2
Thanh Ha [Sat, 11 May 2019 01:58:34 +0000 (21:58 -0400)]
Fix yamllint: variable spaces before and after

Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: Ib14a921f3f8d4807c5bba22dc642514572c55894

6 years agoAdd py37 and select install py34 81/14181/1
Jeremy Phelps [Mon, 14 Jan 2019 21:51:50 +0000 (15:51 -0600)]
Add py37 and select install py34

Do not install py34 on Ubuntu 18.04

Change-Id: I66512d20132d33b2adc0c058d020be6b1afa2230
Signed-off-by: Jeremy Phelps <jphelps@linuxfoundation.org>
6 years agoFix docs indent 92/13692/1
Anil Belur [Wed, 28 Nov 2018 09:06:32 +0000 (19:06 +1000)]
Fix docs indent

Change-Id: I18a752e71df84d915a2672d6d2ba316f4f368298
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
6 years agoDisable py34 install on Ubuntu 18.04 54/12654/1
Jeremy Phelps [Wed, 19 Sep 2018 15:29:54 +0000 (10:29 -0500)]
Disable py34 install on Ubuntu 18.04

This version of python is not compatible with the default lib-ssl
on 18.04

Change-Id: I2e93bcf40f557aa23733449a91d783365f1ffd7d
Signed-off-by: Jeremy Phelps <jphelps@linuxfoundation.org>
6 years agoMigrate from deprecated docker-py to docker 81/11881/1
Thanh Ha [Fri, 20 Jul 2018 18:37:01 +0000 (14:37 -0400)]
Migrate from deprecated docker-py to docker

Change-Id: I2535602f55e34ca4596bde9c9263082ccc23b055
Signed-off-by: Thanh Ha <zxiiro@linux.com>
7 years agoMigrate lf-ansible python-install role 39/9039/1
Thanh Ha [Sat, 24 Feb 2018 19:43:32 +0000 (14:43 -0500)]
Migrate lf-ansible python-install role

Issue: RELENG-809
Change-Id: Ib29fb4580b00dd2c50e6a7b2168ebe8400965260
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoBootstrap python-install role 38/9038/2
Thanh Ha [Sat, 24 Feb 2018 19:21:09 +0000 (14:21 -0500)]
Bootstrap python-install role

Issue: RELENG-809
Change-Id: I07c3eefe453bfc01433fcee57ef08818bfc3238e
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoInitial empty repository
Andrew Grimberg [Tue, 20 Feb 2018 22:07:12 +0000 (22:07 +0000)]
Initial empty repository