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
This commit is contained in:
parent
7cb1c6b16b
commit
f2976b1274
@ -1,13 +1 @@
|
|||||||
Install yarn from yarnpkg repos
|
Install yarn from yarnpkg repos
|
||||||
|
|
||||||
**Role Variables**
|
|
||||||
|
|
||||||
.. zuul:rolevar:: zuul_work_dir
|
|
||||||
:default: {{ zuul.project.src_dir }}
|
|
||||||
|
|
||||||
The directory to work in.
|
|
||||||
|
|
||||||
.. zuul:rolevar:: yarn_lock_file_path
|
|
||||||
:default: {{ zuul_work_dir }}/yarn.lock
|
|
||||||
|
|
||||||
Path to yarn.lock file used by a project.
|
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
zuul_work_dir: "{{ zuul.project.src_dir }}"
|
|
||||||
yarn_lock_file_path: "{{ zuul_work_dir }}/yarn.lock"
|
|
@ -21,15 +21,14 @@
|
|||||||
repositories_keys: "{{ _yarn_keys | default([]) }}"
|
repositories_keys: "{{ _yarn_keys | default([]) }}"
|
||||||
repositories_list: "{{ _yarn_repos | default([]) }}"
|
repositories_list: "{{ _yarn_repos | default([]) }}"
|
||||||
|
|
||||||
- name: Check for yarn.lock file
|
- name: Install yarn from yarnpkg.com
|
||||||
stat:
|
package:
|
||||||
path: "{{ yarn_lock_file_path }}"
|
name: yarn
|
||||||
get_checksum: false
|
state: latest
|
||||||
get_mime: false
|
become: yes
|
||||||
get_md5: false
|
tags:
|
||||||
register: yarn_lock
|
# Ignore ANSIBLE0010: We really want latest version
|
||||||
|
- skip_ansible_lint
|
||||||
|
|
||||||
- name: Install yarn if needed
|
- name: Output yarn version
|
||||||
include: yarn.yaml
|
command: yarn --version
|
||||||
when:
|
|
||||||
- yarn_lock.stat.exists
|
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
- 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
|
|
Loading…
Reference in New Issue
Block a user