From 571abfbb2c7d7152df44574db890e23e4a208dea Mon Sep 17 00:00:00 2001 From: Jose M Date: Wed, 20 Nov 2019 19:00:53 +0100 Subject: [PATCH] Update untar task to pass linting, added comment --- .../tasks/installation_from_sources.yml | 7 ++++--- .../tasks/installation_from_sources.yml | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/roles/wazuh/ansible-wazuh-agent/tasks/installation_from_sources.yml b/roles/wazuh/ansible-wazuh-agent/tasks/installation_from_sources.yml index 053b4ea6..381f9c67 100644 --- a/roles/wazuh/ansible-wazuh-agent/tasks/installation_from_sources.yml +++ b/roles/wazuh/ansible-wazuh-agent/tasks/installation_from_sources.yml @@ -1,5 +1,4 @@ --- - - name: Install dependencies to build Wazuh packages package: name: @@ -38,8 +37,10 @@ path: "/tmp/wazuh-{{ wazuh_sources_installation.branch }}" state: directory - - name: Extract downloaded Wazuh branch from Github - shell: "tar -xzvf /tmp/{{ wazuh_sources_installation.branch }}.tar.gz --strip 1 --directory /tmp/wazuh-{{ wazuh_sources_installation.branch }}" + - name: Extract downloaded Wazuh branch from Github # Using shell instead of unarchive due to that module not working properlyh with --strip + command: "tar -xzvf /tmp/{{ wazuh_sources_installation.branch }}.tar.gz --strip 1 --directory /tmp/wazuh-{{ wazuh_sources_installation.branch }}" + register: wazuh_untar + changed_when: wazuh_untar.rc ==0 args: warn: false 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 cb12739e..65e06e24 100644 --- a/roles/wazuh/ansible-wazuh-manager/tasks/installation_from_sources.yml +++ b/roles/wazuh/ansible-wazuh-manager/tasks/installation_from_sources.yml @@ -38,8 +38,10 @@ path: "/tmp/wazuh-{{ wazuh_sources_installation.branch }}" state: directory - - name: Extract downloaded Wazuh branch from Github - shell: "tar -xzvf /tmp/{{ wazuh_sources_installation.branch }}.tar.gz --strip 1 --directory /tmp/wazuh-{{ wazuh_sources_installation.branch }}" + - name: Extract downloaded Wazuh branch from Github # Using shell instead of unarchive due to that module not working properlyh with --strip + command: "tar -xzvf /tmp/{{ wazuh_sources_installation.branch }}.tar.gz --strip 1 --directory /tmp/wazuh-{{ wazuh_sources_installation.branch }}" + register: wazuh_untar + changed_when: wazuh_untar.rc ==0 args: warn: false