An open API service indexing awesome lists of open source software.

https://github.com/mediapop/ansible-python

A role for setting up an alternative default python.
https://github.com/mediapop/ansible-python

alternative-pythons ansible playbook python

Last synced: 3 months ago
JSON representation

A role for setting up an alternative default python.

Awesome Lists containing this project

README

        

# Ansible Python

*This ansible role is created and maintained by [Media Pop](https://www.mediapop.co), a software consultancy. Hire us to resolve your DevOps challenges.*

[![Travis](https://travis-ci.org/mediapop/ansible-python.svg?branch=master)](https://travis-ci.org/mediapop/ansible-python)
[![Ansible Galaxy](https://img.shields.io/badge/ansible-mediapop.python-green)](https://galaxy.ansible.com/mediapop/python)

Install other versions of python and set them as the default.

## Role Variables

```yml
python_alternative_version: "3.6"
python_pip_version: "20.2.2"
```

## Example Playbook

```yml
- hosts: webservers
roles:
- role: mediapop.python
```

## No module named apt_pkg

You can't use these alternative pythons with ansible always because it uses a package provided by `python3-apt`. [Set the ansible runtime python](http://docs.ansible.com/ansible/latest/python_3_support.html) with `ansible_python_interpreter: /usr/bin/python3.5` in the inventory or the playbook.