Mohammed Naser f2976b1274 install-yarn: always install
The role previously conditionally installed YARN only if there was
a yarn.lock.  The role shouldn't conditionally decide to install
if there is a yarn.lock file as that's not expected behaviour.

Change-Id: Ia6940df036fd27d55d60fa959b794de952040745
2020-05-01 15:49:30 +02:00

35 lines
1.1 KiB
YAML

- name: Gather variables for each operating system
include_vars: "{{ zj_item }}"
with_first_found:
- skip: true
files:
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yaml"
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yaml"
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yaml"
- "{{ ansible_distribution | lower }}.yaml"
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yaml"
- "{{ ansible_os_family | lower }}.yaml"
loop_control:
loop_var: zj_item
tags:
- always
- name: Add all repositories
include_role:
name: ensure-package-repositories
vars:
repositories_keys: "{{ _yarn_keys | default([]) }}"
repositories_list: "{{ _yarn_repos | default([]) }}"
- name: Install yarn from yarnpkg.com
package:
name: yarn
state: latest
become: yes
tags:
# Ignore ANSIBLE0010: We really want latest version
- skip_ansible_lint
- name: Output yarn version
command: yarn --version