Skip to content

Instantly share code, notes, and snippets.

@brahimmachkouri
Last active Feb 19, 2022
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