Installs Node.js on Windows.
Requires the following to be executed in Powershell on the target machine(s):
> Set-ExecutionPolicy RemoteSigned
Download and execute this Powershell script: ConfigureRemotingForAnsible.ps1
Available variables are listed below, along with default values (see defaults/main.yml
):
nodejs_version: "8.9.1"
npm_registries: []
npm_pkgs: []
None.
$ ansible-galaxy install stockhausenj.win-nodejs
$ ansible-playbook -i inventory.yaml setup-nodejs.yaml -u admin --ask-pass
- hosts: all
vars:
ansible_port: 5986
ansible_connection: winrm
ansible_winrm_server_cert_validation: ignore
tasks:
roles:
- include_role:
name: stockhausenj.ansible_win_nodejs
vars:
nodejs_version: "8.9.1"
npm_registries: ["@myrepo:registry=http://localhost:1234/"]
npm_pkgs: ["express","@myrepo/just.for.fun@latest"]
MIT