Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/fubarhouse/ansible-role-python

Ansible role which provisions python and pip modules using pyenv
https://github.com/fubarhouse/ansible-role-python

ansible python

Last synced: about 1 month ago
JSON representation

Ansible role which provisions python and pip modules using pyenv

Awesome Lists containing this project

README

        

# Ansible Role: Python

[![Build Status](https://img.shields.io/travis/fubarhouse/ansible-role-python/master.svg?style=for-the-badge)](https://travis-ci.org/fubarhouse/ansible-role-python)
[![stability-stable](https://img.shields.io/badge/stability-stable-green.svg?style=for-the-badge)](https://github.com/orangemug/stability-badges)
[![Ansible Galaxy](https://img.shields.io/ansible/role/5140.svg?style=for-the-badge)](https://galaxy.ansible.com/fubarhouse/python)
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge)](https://raw.githubusercontent.com/fubarhouse/ansible-role-hub/master/LICENSE)

* PyEnv on CentOS/Darwin/Debian/RedHat servers.
* Installs multiple python versions as required.
* Installs a virtualenv for a specified version of Python.
* Installs PIP packages

## Requirements

None.

## Role Variables

Default Python version
````
python_version: 2.7.15
````
All Python versions to install
````
python_versions:
- 2.7.15
- 3.5.1
````
Python packages to download
````
python_packages:
- pyyaml
- jinja2
- virtualenv
- pyasn1
- Django
````
List of all virtualenvs to install

**Note**: If this is not specified, the variable `python_version` will be allocated to this array.
````
virtualenvs:
- name: "Global-2.7.15"
version: 2.7.15
````
Virtualenvs to use as the global python system

**Note**: If this is not specified, the variable `python_version` will be allocated to this variable.
````
virtualenv: 2.7.15
````
## Dependencies

None.

## Example Playbook
````
- hosts: localhost
roles:
- fubarhouse.python
````

## Installation

* Install using `ansible-galaxy install fubarhouse.python`
* Add the Python role to your playbook.
* Modify above variables as desired.

## License

MIT / BSD

## Author Information

This role was created in 2015 by [Karl Hepworth](https://twitter.com/fubarhouse).