roles/ensure-python: Fix 'python_use_stow' option
Fix a syntax error in stow.yaml that broke the 'python_use_stow' option. While at it, make sure that a proper error message is shown if no stow environments are installed on the system. Change-Id: Ifa696daa367997fb705ba22527137f4f051ca558
This commit is contained in:
parent
b192ccee73
commit
d8af2889f8
@ -5,9 +5,14 @@
|
|||||||
file_type: directory
|
file_type: directory
|
||||||
register: stow_envs
|
register: stow_envs
|
||||||
|
|
||||||
|
- name: Fail if no stow environments have been found
|
||||||
|
assert:
|
||||||
|
that: stow_envs.matched > 0
|
||||||
|
fail_msg: "Did not find any stow environments in {{ python_stow_dir }}"
|
||||||
|
|
||||||
- name: Activate stow
|
- name: Activate stow
|
||||||
command: "stow -d {{ python_stow_dir }} -S {{ zj_stow_env | basename }}"
|
command: "stow -d {{ python_stow_dir }} -S {{ zj_stow_env | basename }}"
|
||||||
loop: "{{ stow_envs.files | map(attribute='path') | list }}"
|
loop: "{{ stow_envs.files | map(attribute='path') | list }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: zj_stow_env
|
loop_var: zj_stow_env
|
||||||
when: python_version in item
|
when: python_version in zj_stow_env
|
||||||
|
Loading…
x
Reference in New Issue
Block a user