diff --git a/roles/fetch-zuul-cloner/defaults/main.yaml b/roles/fetch-zuul-cloner/defaults/main.yaml new file mode 100644 index 000000000..296ad19f9 --- /dev/null +++ b/roles/fetch-zuul-cloner/defaults/main.yaml @@ -0,0 +1 @@ +virtualenv: /usr/zuul-env diff --git a/roles/fetch-zuul-cloner/tasks/main.yaml b/roles/fetch-zuul-cloner/tasks/main.yaml index eec70aa02..63d301b24 100644 --- a/roles/fetch-zuul-cloner/tasks/main.yaml +++ b/roles/fetch-zuul-cloner/tasks/main.yaml @@ -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