Skip to content

Instantly share code, notes, and snippets.

@simonmcconnell
Created January 8, 2018 12:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonmcconnell/463b5bf3d1c6f8a6d7a77535fd8c3dd1 to your computer and use it in GitHub Desktop.
Save simonmcconnell/463b5bf3d1c6f8a6d7a77535fd8c3dd1 to your computer and use it in GitHub Desktop.
centos ansible playbook for python3.6 development
# centos version of: https://blog.jetbrains.com/pycharm/2017/12/developing-in-a-vm-with-vagrant-and-ansible/
---
- hosts: all
become: yes
vars:
venv_path: "/home/vagrant/venv"
requirements_path: "/vagrant/requirements.txt"
tasks:
- name: Install IUM repository
yum: name=https://centos7.iuscommunity.org/ius-release.rpm state=installed
- name: Install Python 3.6
yum: name=python36u state=present update_cache=yes
- name: Install pip
yum: name=python36u-pip state=present update_cache=yes
- name: install virtualenv
pip:
name: virtualenv
executable: pip3.6
- name: create virtual environment
become: no
pip:
virtualenv: "{{ venv_path }}"
virtualenv_python: python3.6
requirements: "{{ requirements_path }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment