mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-04 05:04:22 -07:00
(cherry picked from commit 20db4fc560
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
d85d31ba3c
commit
8a8e6c8058
19 changed files with 45 additions and 45 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
- vars:
|
||||
# sample: node-v8.2.0-linux-x64.tar.xz
|
||||
node_path: '{{ remote_dir }}/{{ nodejs_path }}/bin'
|
||||
node_path: '{{ remote_dir }}/{{ nodejs_path }}/bin'
|
||||
package: 'ncp'
|
||||
block:
|
||||
- shell: npm --version
|
||||
|
@ -20,12 +20,12 @@
|
|||
- name: 'Install simple package with no_bin_links disabled'
|
||||
npm:
|
||||
path: '{{ remote_dir }}'
|
||||
executable: '{{ node_path }}/npm'
|
||||
executable: '{{ node_path }}/npm'
|
||||
state: present
|
||||
name: '{{ package }}'
|
||||
no_bin_links: false
|
||||
environment:
|
||||
PATH: '{{ node_path }}:{{ ansible_env.PATH }}'
|
||||
PATH: '{{ node_path }}:{{ ansible_env.PATH }}'
|
||||
register: npm_install_no_bin_links_disabled
|
||||
|
||||
- name: 'Make sure .bin folder has been created'
|
||||
|
@ -41,12 +41,12 @@
|
|||
- name: 'Install simple package with no_bin_links enabled'
|
||||
npm:
|
||||
path: '{{ remote_dir }}'
|
||||
executable: '{{ node_path }}/npm'
|
||||
executable: '{{ node_path }}/npm'
|
||||
state: present
|
||||
name: '{{ package }}'
|
||||
no_bin_links: true
|
||||
environment:
|
||||
PATH: '{{ node_path }}:{{ ansible_env.PATH }}'
|
||||
PATH: '{{ node_path }}:{{ ansible_env.PATH }}'
|
||||
register: npm_install_no_bin_links_enabled
|
||||
|
||||
- name: 'Make sure .bin folder has not been created'
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
- vars:
|
||||
# sample: node-v8.2.0-linux-x64.tar.xz
|
||||
node_path: '{{ remote_dir }}/{{ nodejs_path }}/bin'
|
||||
node_path: '{{ remote_dir }}/{{ nodejs_path }}/bin'
|
||||
package: 'iconv-lite'
|
||||
block:
|
||||
- shell: npm --version
|
||||
|
@ -19,11 +19,11 @@
|
|||
- name: 'Install simple package without dependency'
|
||||
npm:
|
||||
path: '{{ remote_dir }}'
|
||||
executable: '{{ node_path }}/npm'
|
||||
executable: '{{ node_path }}/npm'
|
||||
state: present
|
||||
name: '{{ package }}'
|
||||
environment:
|
||||
PATH: '{{ node_path }}:{{ ansible_env.PATH }}'
|
||||
PATH: '{{ node_path }}:{{ ansible_env.PATH }}'
|
||||
register: npm_install
|
||||
|
||||
- assert:
|
||||
|
@ -38,7 +38,7 @@
|
|||
state: present
|
||||
name: '{{ package }}'
|
||||
environment:
|
||||
PATH: '{{ node_path }}:{{ ansible_env.PATH }}'
|
||||
PATH: '{{ node_path }}:{{ ansible_env.PATH }}'
|
||||
register: npm_reinstall
|
||||
|
||||
- name: Check there is no change
|
||||
|
@ -59,7 +59,7 @@
|
|||
state: present
|
||||
name: '{{ package }}'
|
||||
environment:
|
||||
PATH: '{{ node_path }}:{{ ansible_env.PATH }}'
|
||||
PATH: '{{ node_path }}:{{ ansible_env.PATH }}'
|
||||
register: npm_fix_install
|
||||
|
||||
- name: Check result is changed and successful
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue