zuul-jobs/roles/install-yarn/tasks/main.yaml
Paul Belanger 05fa2786af Create yarn_lock_file_path variable for install-yarn
This removes the hardcoded path to yarn.lock and allows a user to define
it manually.

Change-Id: Ib29c7d442fd57e583674ba86bdc0d5edfac844c9
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-11-28 10:21:57 -05: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