From 3e3b64be9c4f3fd8f9e52ec459e950d4bd4f46b2 Mon Sep 17 00:00:00 2001 From: Andrew Grigorev Date: Thu, 24 Sep 2015 15:49:23 +0300 Subject: [PATCH 1/2] Install nodejs from nodesource on debian by default --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index ff5db1e..0680397 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,6 +1,6 @@ --- nodejs_playbook_version: "0.1.6" -nodejs_install_source: build #One of: build (from source), nodesource_debs (works only on debian-based distros) +nodejs_install_source: '{% if ansible_os_family == "Debian" %}nodesource_debs{% else %}build{% endif %}' nodejs_version: "0.10.36" nodejs_path: "/usr/local/" nodejs_tmp_dir: "/tmp/" From f22b6a8b44a780657eb97bba22be7d8c640b640f Mon Sep 17 00:00:00 2001 From: Andrew Grigorev Date: Fri, 25 Sep 2015 16:26:13 +0300 Subject: [PATCH 2/2] Use return code to check that node was installed --- ci/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/tests.yml b/ci/tests.yml index 357db63..797d973 100644 --- a/ci/tests.yml +++ b/ci/tests.yml @@ -14,4 +14,4 @@ - fail: msg: "Node Not Found, tests failed." - when: node_path.stdout != "/usr/local/bin/node" + when: node_path.rc != 0