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:
parent
560a907b06
commit
6bb1f6046b
1
roles/fetch-zuul-cloner/defaults/main.yaml
Normal file
1
roles/fetch-zuul-cloner/defaults/main.yaml
Normal file
@ -0,0 +1 @@
|
|||||||
|
virtualenv: /usr/zuul-env
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user