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 - name: Install zuul-cloner shim dependencies
file: pip:
path: "{{ destination | dirname }}" name: PyYAML
state: directory virtualenv: "{{ virtualenv }}"
become: yes become: yes
- name: Install zuul-cloner shim - name: Install zuul-cloner shim
template: template:
src: templates/zuul-cloner-shim.py.j2 src: templates/zuul-cloner-shim.py.j2
dest: "{{ destination }}" dest: "{{ virtualenv }}/bin/zuul-cloner"
become: yes become: yes
- name: Change zuul-cloner permissions - name: Change zuul-cloner permissions
file: file:
path: "{{ destination }}" path: "{{ virtualenv }}/bin/zuul-cloner"
mode: 0755 mode: 0755
become: yes become: yes