zuul-jobs/roles/ensure-virtualenv/tasks/main.yaml
Albin Vass efc34c4acc ensure-virtualenv: update include to inlude_tasks
Change-Id: I3b50e3222200516921568464ad5e2f2655ce925b
2020-05-26 10:07:23 +02:00

21 lines
589 B
YAML

- name: Check if virtualenv is installed
shell: |
command -v virtualenv || exit 1
args:
executable: /bin/bash
register: virtualenv_preinstalled
failed_when: false
- name: Install virtualenv package
include_tasks: "{{ zj_distro_os }}"
with_first_found:
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml"
- "{{ ansible_distribution_release }}.yaml"
- "{{ ansible_distribution }}.yaml"
- "{{ ansible_os_family }}.yaml"
- "default.yaml"
loop_control:
loop_var: zj_distro_os
when:
- virtualenv_preinstalled.rc != 0