cm/nodejs.yml
---
- name: install nodejs
hosts: all
gather_facts: True
sudo: True
tasks:
- name: add apt key for nodesource
apt_key: url=https://deb.nodesource.com/gpgkey/nodesource.gpg.key
- name: add repo for nodesource
apt_repository:
repo: 'deb https://deb.nodesource.com/node_7.x {{ ansible_distribution_release }} main'
update_cache: yes
- name: install nodejs
apt: name=nodejs