Unverified Commit 1972b82f authored by David Haynes's avatar David Haynes
Browse files

Python3 packages installed with ansible

- django_manage still runs the server with python2, working on it
- can confirm manually running the server with python3 works
parent 4c3ebb70
Pipeline #773 passed with stage
in 1 minute and 14 seconds
......@@ -9,16 +9,40 @@
- hosts: all
tasks:
- name: install go packages
- name: Install Python 3.5 and related packages
apt:
name: "{{ item }}"
update_cache: yes
state: present
with_items:
- python3
- python3-dev
- python3-pip
- name: Upgrade pip
pip:
name: pip
state: latest
- name: Install virtualenv
pip:
name: virtualenv
- name: Create the virtualenv
command: virtualenv -p python3 /vagrant/venv
- name: install site packages to virtual env
pip:
requirements: "{{ django['requirements_path'] }}"
virtualenv: "{{ django['venv_path'] }}"
virtualenv_python: /usr/bin/python3
- name: Install go packages
apt:
name: "{{ item }}"
state: latest
update_cache: yes
with_items:
- python3
- python3-dev
- python-virtualenv
- python3-pip
- libldap2-dev
- libsasl2-dev
- mysql-server
......@@ -53,13 +77,6 @@
priv: test_{{ mysql['db'] }}.*:ALL
append_privs: yes
- name: install site packages to virtual env
shell: "cd /vagrant; virtualenv venv; source venv/bin/activate; pip3 install -r requirements.txt"
# pip:
# requirements: "{{ django['requirements_path'] }}"
# virtualenv: "{{ django['venv_path'] }}"
# virtualenv_python: python3
- name: install django settings.py
template:
src: templates/settings.py.j2
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment