mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
Return correct values when running yarn in check mode (#153)
* Fixes Check Mode * Adds parenthesis * Adds changelog and tests
This commit is contained in:
parent
02a032aa45
commit
54014529bd
3 changed files with 22 additions and 1 deletions
|
@ -69,6 +69,24 @@
|
|||
that:
|
||||
- not (yarn_install is changed)
|
||||
|
||||
- name: 'Install all packages in check mode.'
|
||||
yarn:
|
||||
path: '{{ output_dir }}'
|
||||
executable: '{{ yarn_bin_path }}/yarn'
|
||||
state: present
|
||||
environment:
|
||||
PATH: '{{ node_bin_path }}:{{ ansible_env.PATH }}'
|
||||
check_mode: true
|
||||
register: yarn_install_check
|
||||
|
||||
- name: verify test yarn global installation in check mode
|
||||
assert:
|
||||
that:
|
||||
- yarn_install_check.err is defined
|
||||
- yarn_install_check.out is defined
|
||||
- yarn_install_check.err is none
|
||||
- yarn_install_check.out is none
|
||||
|
||||
- name: 'Install package with explicit version (older version of package)'
|
||||
yarn:
|
||||
path: '{{ output_dir }}'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue