From 89f923d78db01c467bb14c8099fc69b087b5acda Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jun 13 2017 20:13:23 +0000 Subject: Ensure the right version of pygit2 is installed in the venv on vagrant --- diff --git a/ansible/roles/pagure-dev/tasks/main.yml b/ansible/roles/pagure-dev/tasks/main.yml index 89d668b..d408704 100644 --- a/ansible/roles/pagure-dev/tasks/main.yml +++ b/ansible/roles/pagure-dev/tasks/main.yml @@ -56,6 +56,10 @@ - python3-devel - redhat-rpm-config +- name: register the libgit2 version installed + shell: rpm -q libgit2|cut -d \- -f 2| cut -d \. -f 1,2 + register: libgit2_version + # Add various helpful configuration files - name: Install a custom bashrc become_user: "{{ ansible_env.SUDO_USER }}" @@ -66,6 +70,15 @@ # Install Pagure inside a virtualenv and configure it +- name: Install pygit2 in the virtualenv + become_user: "{{ ansible_env.SUDO_USER }}" + pip: + name: "{{ item }}" + virtualenv: /home/{{ ansible_env.SUDO_USER }}/.virtualenvs/python2-pagure/ + virtualenv_python: python2 + with_items: + - "pygit2=={{ libgit2_version.stdout_lines[0] }}.*" + - name: Install Pagure Python dependencies into a virtualenv become_user: "{{ ansible_env.SUDO_USER }}" pip: