Setup virtualenv for zuul-cloner

The zuul-cloner shim require PyYAML as a dependency, create a
virtualenv and install it.

This replaces the destination with virtualenv variable.

Change-Id: I3e55a3a1582aa7dea21c7de67260c2c906c2192b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2017-11-22 02:06:55 -05:00
parent 560a907b06
commit 6bb1f6046b
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
2 changed files with 7 additions and 6 deletions

View File

@ -0,0 +1 @@
virtualenv: /usr/zuul-env

View File

@ -1,18 +1,18 @@
- name: Create zuul-cloner destination directory
file:
path: "{{ destination | dirname }}"
state: directory
- name: Install zuul-cloner shim dependencies
pip:
name: PyYAML
virtualenv: "{{ virtualenv }}"
become: yes
- name: Install zuul-cloner shim
template:
src: templates/zuul-cloner-shim.py.j2
dest: "{{ destination }}"
dest: "{{ virtualenv }}/bin/zuul-cloner"
become: yes
- name: Change zuul-cloner permissions
file:
path: "{{ destination }}"
path: "{{ virtualenv }}/bin/zuul-cloner"
mode: 0755
become: yes