From 39b501b98cdd7f5458efba034ac205db19da7d1b Mon Sep 17 00:00:00 2001 From: Carlos Bordon <64099752+c-bordon@users.noreply.github.com> Date: Fri, 19 Jul 2024 10:41:42 -0300 Subject: [PATCH] Revert "Revert "Merge branch '4.8.1' into merge-4.8.1-into-4.9.0"" --- .../ansible-wazuh-manager/tasks/main.yml | 43 ++++++++++++++----- roles/wazuh/wazuh-indexer/tasks/RedHat.yml | 7 ++- 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/roles/wazuh/ansible-wazuh-manager/tasks/main.yml b/roles/wazuh/ansible-wazuh-manager/tasks/main.yml index b2b852239..1614ed84c 100644 --- a/roles/wazuh/ansible-wazuh-manager/tasks/main.yml +++ b/roles/wazuh/ansible-wazuh-manager/tasks/main.yml @@ -1,17 +1,38 @@ --- - name: "Install dependencies" - package: - name: - - unzip - - openssl - - tar - - curl - state: present - register: package_status - until: "package_status is not failed" - retries: 10 - delay: 10 + block: + - name: "Install common dependencies" + package: + name: + - unzip + - openssl + - tar + state: present + register: package_status + until: "package_status is not failed" + retries: 10 + delay: 10 + + - name: "Install curl" + package: + name: curl + state: present + when: ansible_distribution != "Amazon" and ansible_distribution_version != "2023" + register: package_status + until: "package_status is not failed" + retries: 10 + delay: 10 + + - name: "Install curl minimal in AL2023" + package: + name: curl-minimal + state: present + when: ansible_distribution == "Amazon" and ansible_distribution_version == "2023" + register: package_status + until: "package_status is not failed" + retries: 10 + delay: 10 - include_vars: ../../vars/repo_vars.yml diff --git a/roles/wazuh/wazuh-indexer/tasks/RedHat.yml b/roles/wazuh/wazuh-indexer/tasks/RedHat.yml index d1d0a0608..591752137 100644 --- a/roles/wazuh/wazuh-indexer/tasks/RedHat.yml +++ b/roles/wazuh/wazuh-indexer/tasks/RedHat.yml @@ -12,12 +12,15 @@ - - name: Amazon Linux | Install Amazon extras + - name: Amazon Linux | Configure system settings block: - - name: Install Amazon extras + - name: Install Amazon extras in Amazon Linux 2 yum: name: amazon-linux-extras state: present + when: + - ansible_distribution == 'Amazon' + - ansible_distribution_major_version == '2' - name: Configure vm.max_map_count lineinfile: