This is a simple role that will install Node.js on Debian/Ubuntu from Nodesource.
Add this to your requirements.yml
:
- src: https://github.com/angristan/ansible-nodejs
---
- hosts: myhost
roles:
- name: nodejs
tags: nodejs
vars:
nodejs_version: 12