diff --git a/roles/nodejs/tasks/setup.yml b/roles/nodejs/tasks/setup.yml index 1cdd0e9..3727b30 100644 --- a/roles/nodejs/tasks/setup.yml +++ b/roles/nodejs/tasks/setup.yml @@ -67,9 +67,9 @@ - name: Ensure npm global packages are installed. community.general.npm: name: "{{ item.name | default(item) }}" - version: "{{ item.version | default('latest') }}" + version: "{{ item.version | default(omit) }}" global: true - state: latest + state: "{{ item.state | default('present') }}" environment: NPM_CONFIG_PREFIX: "{{ npm_config_prefix }}" NODE_PATH: "{{ npm_config_prefix }}/lib/node_modules"