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