From 9d62860ea1644656db5c949e2c46f152f87e83c1 Mon Sep 17 00:00:00 2001 From: Jose M Date: Wed, 20 Nov 2019 19:06:48 +0100 Subject: [PATCH] Update "installation_from_sources" to fix linting errors --- .../tasks/installation_from_sources.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/roles/wazuh/ansible-wazuh-manager/tasks/installation_from_sources.yml b/roles/wazuh/ansible-wazuh-manager/tasks/installation_from_sources.yml index 65e06e24..1ecfd7c8 100644 --- a/roles/wazuh/ansible-wazuh-manager/tasks/installation_from_sources.yml +++ b/roles/wazuh/ansible-wazuh-manager/tasks/installation_from_sources.yml @@ -80,15 +80,19 @@ mode: "0700" - name: Execute downloaded script to install Nodejs repo - shell: /tmp/setup_nodejs_repo.sh - + command: /tmp/setup_nodejs_repo.sh + register: node_repo_installation_result + changed_when: node_repo_installation_result.rc == 0 + - name: Install Nodejs package: name: nodejs state: present - + - name: Run NPM under root account - shell: npm config set user 0 + command: npm config set user 0 + register: allow_root_npm + changed_when: allow_root_npm.rc == 0 - name: Download the installation script to install Wazuh API get_url: @@ -97,4 +101,6 @@ mode: "0700" - name: Execute Wazuh API installation script - shell: /tmp/install_api.sh download + command: /tmp/install_api.sh download + register: install_api + changed_when: install_api.rc == 0