diff --git a/roles/fetch-zuul-cloner/README.rst b/roles/fetch-zuul-cloner/README.rst index d4db2e218..a2a2558f7 100644 --- a/roles/fetch-zuul-cloner/README.rst +++ b/roles/fetch-zuul-cloner/README.rst @@ -1,10 +1,13 @@ Fetch the zuul-cloner shim and install to the destination. +**Role Variables** + .. zuul:rolevar:: repo_src_dir Location of the Zuul source repositories. -.. zuul:rolevar:: destination +.. zuul:rolevar:: fetch_zuul_cloner_virtualenv + :default: ``/usr/zuul-env`` - Where to install the zuul-cloner shim. This should be the full path - and filename. + The path to the virtualenv to install the shim. See the ensure-pip + role for details of virtualenv creation. diff --git a/roles/fetch-zuul-cloner/defaults/main.yaml b/roles/fetch-zuul-cloner/defaults/main.yaml index 296ad19f9..87ed76bea 100644 --- a/roles/fetch-zuul-cloner/defaults/main.yaml +++ b/roles/fetch-zuul-cloner/defaults/main.yaml @@ -1 +1 @@ -virtualenv: /usr/zuul-env +fetch_zuul_cloner_virtualenv: /usr/zuul-env diff --git a/roles/fetch-zuul-cloner/tasks/main.yaml b/roles/fetch-zuul-cloner/tasks/main.yaml index 63d301b24..635bd338c 100644 --- a/roles/fetch-zuul-cloner/tasks/main.yaml +++ b/roles/fetch-zuul-cloner/tasks/main.yaml @@ -1,18 +1,23 @@ +- name: Run ensure-pip + include_role: + name: ensure-pip + - name: Install zuul-cloner shim dependencies pip: name: PyYAML - virtualenv: "{{ virtualenv }}" + virtualenv_command: '{{ ensure_pip_virtualenv_command }}' + virtualenv: '{{ fetch_zuul_cloner_virtualenv }}' become: yes - name: Install zuul-cloner shim template: src: templates/zuul-cloner-shim.py.j2 - dest: "{{ virtualenv }}/bin/zuul-cloner" + dest: "{{ fetch_zuul_cloner_virtualenv }}/bin/zuul-cloner" become: yes - name: Change zuul-cloner permissions file: - path: "{{ virtualenv }}/bin/zuul-cloner" + path: "{{ fetch_zuul_cloner_virtualenv }}/bin/zuul-cloner" mode: 0755 become: yes