Permalink
Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up
Fetching contributors…
Cannot retrieve contributors at this time.
Cannot retrieve contributors at this time
| --- | |
| # Make sure the virtualenv is created and requirements are installed | |
| - name: Create virtualenv directory with correct file permissions | |
| file: name="{{ venv }}" | |
| state=directory | |
| owner={{ application_user }} | |
| group={{ application_user }} | |
| mode=0754 | |
| remote_user: root | |
| - name: Upgrade pip | |
| pip: virtualenv={{ venv }} | |
| name=pip | |
| extra_args='--upgrade' | |
| virtualenv_python=python3 | |
| - name: Install requirements | |
| pip: virtualenv={{ venv }} | |
| chdir={{ project_home }} | |
| requirements=requirements/{{ target }}.txt | |
| virtualenv_python=python3 | |
| notify: | |
| - restart uwsgi | |
| - name: Automatically export environment from file on the server itself | |
| lineinfile: dest={{ venv }}/bin/activate state=present line="source {{ env_file_dest_bash }}" |