[Docs] Add Ansible task example

Add Ansible task example to show how to install nvm and update it.

Ansible is a systems administration tool.
See https://github.com/ansible/ansible

My personal experience of `nvm` is that installing via Ansible is good, and that a good example can help. This example took me about an hour to learn, so I'm hoping to save other people some time. This example is somewhat different than any others that I found on the web. There may be a better way to write it, and if so, please improve it.
Joel Parker Henderson 2018-12-19 12:45:59 -08:00 committed by Jordan Harband
parent 14179bc8ce
commit fb83eeb140
No known key found for this signature in database
GPG Key ID: 64A196AEE0916D55
1 changed files with 12 additions and 0 deletions

View File

@ -6,6 +6,7 @@
- [Installation](#installation)
- [Install script](#install-script)
- [Ansible](#ansible)
- [Verify installation](#verify-installation)
- [Important Notes](#important-notes)
- [Git install](#git-install)
@ -91,6 +92,17 @@ If the above doesn't fix the problem, open your `.bash_profile` and add the foll
- For more information about this issue and possible workarounds, please [refer here](https://github.com/creationix/nvm/issues/576)
#### Ansible
You can use a task:
```
- name: nvm
shell: >
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
args:
creates: "{{ ansible_env.HOME }}/.nvm/nvm.sh"
```
### Verify installation
To verify that nvm has been installed, do: