zuul-jobs/roles/ensure-yarn/tasks/main.yaml
vass 0b4ed70366 Rename install-yarn to ensure-yarn for consistency
The old role will be kept and include ensure-yarn for backwards-compatability.

Change-Id: I7631c7e588bc953d6e3b22759abe66a73ffca728
2020-04-04 15:41:29 -04:00

16 lines
353 B
YAML

- name: Check for yarn.lock file
stat:
path: "{{ yarn_lock_file_path }}"
get_checksum: false
get_mime: false
get_md5: false
register: yarn_lock
- name: Install yarn if needed
include: "{{ item }}"
with_first_found:
- "{{ ansible_distribution }}.yaml"
- "{{ ansible_os_family }}.yaml"
when:
- yarn_lock.stat.exists