Skip to content

Instantly share code, notes, and snippets.

@brahimmachkouri
Last active February 19, 2022 17:04
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Ansible playbook to install nodejs 14
---
- name: ilovenode
hosts: dev
become: yes
gather_facts: no
tasks:
- name: Run the equivalent of "apt-get update" as a separate step
apt:
update_cache: yes
- name: Download node installer
get_url:
url=https://deb.nodesource.com/setup_14.x
dest=/tmp/setup_14.x
mode=0440
- name: Install node
command: /bin/bash /tmp/setup_14.x
- name: Install required packages
apt:
name: ['git', 'curl', 'wget', 'nginx', 'nodejs']
state: present
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment