nvm install [version]
You'll need to use the
shell module, because you want to run shell commands, and you'll need to source in the
nvm script into that environment. Something like:
- shell: | source /path/to/nvm nvm install ...
Whether or not you use
become depends on whether or not you want to run the commands as
root (or another user).