Ansible playbook to install nodejs 14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- 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