Created
January 8, 2018 12:26
-
-
Save simonmcconnell/463b5bf3d1c6f8a6d7a77535fd8c3dd1 to your computer and use it in GitHub Desktop.
centos ansible playbook for python3.6 development
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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