Skip to content
Snippets Groups Projects
Commit c87c59a7 authored by nimrod's avatar nimrod
Browse files

- Install Python packages in a virtualenv.

parent 773fef59
No related branches found
No related tags found
No related merge requests found
...@@ -9,19 +9,31 @@ ...@@ -9,19 +9,31 @@
- pelican_gitreceive_output is defined - pelican_gitreceive_output is defined
- name: APT install prerequisites - name: APT install prerequisites
when: ansible_pkg_mgr == 'apt'
apt: apt:
name: python-dev name: [python-dev, libssl-dev, libffi-dev, build-essential]
state: present state: present
update_cache: yes update_cache: yes
cache_valid_time: 3600 cache_valid_time: 3600
- name: Create virtualenv directory
file:
path: /var/lib/pelican-gitreceive
owner: git
group: git
mode: 0o0700
state: directory
- name: pip install - name: pip install
become: True
become_user: git
with_items: with_items:
- pelican - pelican
- fabric - Fabric
pip: pip:
name: '{{ item }}' name: '{{ item }}'
state: present state: present
virtualenv: /var/lib/pelican-gitreceive
- name: Create directory structure - name: Create directory structure
file: file:
......
...@@ -4,8 +4,10 @@ echo Recieving blog... ...@@ -4,8 +4,10 @@ echo Recieving blog...
tempdir="$(mktemp -d)" tempdir="$(mktemp -d)"
cd $tempdir cd $tempdir
tar -xf - tar -xf -
echo Fetching Git submodules echo Fetching Git submodules...
git submodule update --init --recursive git submodule update --init --recursive
echo Activating virtualenv...
. /var/lib/pelican-gitreceive/bin/activate
echo Building blog... echo Building blog...
fab build fab build
echo Syncing blog... echo Syncing blog...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment