From 7e5387fe0a1d4679edcacadf738516856b5a3a2b Mon Sep 17 00:00:00 2001 From: Daniel Palomar Date: Mon, 18 Feb 2019 20:36:54 +0100 Subject: [PATCH 1/2] Ignore error in the NodeJS symlink task In Ubuntu 18.04 the NodeJS binary is called `node` instead of `nodejs`. Fix #33 --- tasks/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index ba70d5d..ff57312 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -79,12 +79,14 @@ version: 2.7.2 global: yes +# This link is needed in Ubuntu 16.04 and in Ubuntu 18.04 raise and error. - name: Create node symlink become: yes file: src: /usr/bin/nodejs dest: /usr/bin/node state: link + ignore_errors: yes - name: Get installed Odoo version (if any) shell: "{{ odoo_role_odoo_python_path }} {{ odoo_role_odoo_bin_path }} --version | cut -d ' ' -f 3" From bc272caa04ea459b21b1ef73ecb2b6bc65c7f1f0 Mon Sep 17 00:00:00 2001 From: Daniel Palomar Date: Wed, 20 Feb 2019 09:27:35 +0100 Subject: [PATCH 2/2] Not run the symlink task if is Ubuntu 18.04 In Ubuntu 18.04 the symlink is not needed because the binary is already called node instead nodejs. --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index ff57312..ee5f291 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -86,7 +86,7 @@ src: /usr/bin/nodejs dest: /usr/bin/node state: link - ignore_errors: yes + when: ansible_distribution == "Ubuntu" and not ansible_distribution_version == "18.04" - name: Get installed Odoo version (if any) shell: "{{ odoo_role_odoo_python_path }} {{ odoo_role_odoo_bin_path }} --version | cut -d ' ' -f 3"