zuul-jobs/roles/ensure-python/tasks/stow.yaml
Dmitriy Rabotyagov 39776cfdd9 Make sure that we pass list in loop
map returns a generator that needs to be converted to a list for
the loop.

We also don't need unique as this is iterating over a list of
directory names that must already be unique.

Change-Id: Ibd22d79be29aaa9d3a7924319c59929e665f9cbc
2020-09-28 22:45:13 +00:00

14 lines
370 B
YAML

- name: Get stow environments
find:
paths: "{{ python_stow_dir }}"
recurse: no
file_type: directory
register: stow_envs
- name: Activate stow
command: "stow -d {{ python_stow_dir }} -S {{ zj_stow_env | basename }}"
loop: "{{ stow_envs.files | map(attribute='path') | list }}"
loop_control:
loop_var: zj_stow_env
when: python_version in item