Browse Source

nodejs role

master
parent
commit
ee6672bc4f
2 changed files with 27 additions and 0 deletions
  1. +2
    -0
      defaults/main.yaml
  2. +25
    -0
      tasks/main.yaml

+ 2
- 0
defaults/main.yaml View File

@@ -1 +1,3 @@
--- ---

nodejs_version: node_10.x

+ 25
- 0
tasks/main.yaml View File

@@ -1 +1,26 @@
--- ---

- name: requirements
apt:
pkg:
- apt-transport-https
- ca-certificates

- name: nodejs apt repository key
apt_key:
url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
id: 9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280

- name: nodejs apt repository
apt_repository:
repo: deb https://deb.nodesource.com/{{nodejs_version}} {{ansible_distribution_release}} main
filename: nodesource

- name: nodejs apt source repository
apt_repository:
repo: deb-src https://deb.nodesource.com/{{nodejs_version}} {{ansible_distribution_release}} main
filename: nodesource

- name: nodejs packages
apt:
pkg: nodejs

Loading…
Cancel
Save