From 0153384d76bb0c41363032ebd51b3e79f9c9d23e Mon Sep 17 00:00:00 2001 From: Julian Labus Date: Tue, 11 Sep 2018 14:14:23 +0200 Subject: [PATCH] add role nodejs --- roles/nodejs/tasks/main.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 roles/nodejs/tasks/main.yml diff --git a/roles/nodejs/tasks/main.yml b/roles/nodejs/tasks/main.yml new file mode 100644 index 0000000..2c0eb0f --- /dev/null +++ b/roles/nodejs/tasks/main.yml @@ -0,0 +1,18 @@ +--- +- name: ensure apt key for nodejs is present + apt_key: + state: present + id: 68576280 + url: "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" + +- name: ensure nodejs apt repo is present + apt_repository: + state: present + repo: "deb https://deb.nodesource.com/node_8.x stretch main" + update_cache: yes + filename: nodesource + +- name: install nodejs package + package: + name: nodejs + state: present