Skip to content

Instantly share code, notes, and snippets.

@nestorsalceda
Created October 4, 2016 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nestorsalceda/4126616845ef4694e6a768df20acb647 to your computer and use it in GitHub Desktop.
Save nestorsalceda/4126616845ef4694e6a768df20acb647 to your computer and use it in GitHub Desktop.
---
- name: install apt-transport-https
apt:
pkg=apt-transport-https
state=present
- name: add nodesource key
apt_key:
url="https://deb.nodesource.com/gpgkey/nodesource.gpg.key"
- name: add nodesource repository
apt_repository:
repo="{{ item }}"
state=present
with_items:
- "deb https://deb.nodesource.com/node_5.x {{ansible_distribution_release}} main"
- "deb-src https://deb.nodesource.com/node_5.x {{ansible_distribution_release}} main"
- name: install package
apt:
pkg=nodejs
default_release={{ ansible_distribution_release }}
state=present
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment