From 0921095dd35c19c699f5042226ebb13566689bc4 Mon Sep 17 00:00:00 2001 From: Jesus Garcia Date: Tue, 12 Nov 2024 18:08:42 -0500 Subject: [PATCH 1/2] Redo dump (change 5.x to 4.x) to allow packages tests --- VERSION | 4 ++-- .../wazuh/ansible-filebeat-oss/defaults/main.yml | 6 +++--- .../wazuh/ansible-wazuh-agent/defaults/main.yml | 4 ++-- .../ansible-wazuh-manager/defaults/main.yml | 2 +- roles/wazuh/check-packages/defaults/main.yml | 2 +- .../wazuh/check-packages/files/packages_uri.txt | 2 +- .../check-packages/scripts/check_packages.sh | 5 +++-- roles/wazuh/vars/repo.yml | 16 ++++++++-------- roles/wazuh/vars/repo_pre-release.yml | 2 +- roles/wazuh/vars/repo_staging.yml | 2 +- roles/wazuh/wazuh-dashboard/defaults/main.yml | 4 ++-- .../wazuh/wazuh-dashboard/templates/wazuh.yml.j2 | 8 ++++---- roles/wazuh/wazuh-dashboard/vars/debian.yml | 2 +- roles/wazuh/wazuh-indexer/defaults/main.yml | 2 +- 14 files changed, 31 insertions(+), 30 deletions(-) diff --git a/VERSION b/VERSION index 13bc9fe86..7261ef42f 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -WAZUH-ANSIBLE_VERSION="v5.0.0" -REVISION="50000" +WAZUH-ANSIBLE_VERSION="v4.9.0" +REVISION="40907" diff --git a/roles/wazuh/ansible-filebeat-oss/defaults/main.yml b/roles/wazuh/ansible-filebeat-oss/defaults/main.yml index a8015c35e..ff1dfc7f7 100644 --- a/roles/wazuh/ansible-filebeat-oss/defaults/main.yml +++ b/roles/wazuh/ansible-filebeat-oss/defaults/main.yml @@ -1,7 +1,7 @@ --- filebeat_version: 7.10.2 -wazuh_template_branch: v5.0.0 +wazuh_template_branch: v4.9.0 filebeat_node_name: node-1 @@ -23,7 +23,7 @@ local_certs_path: "{{ playbook_dir }}/indexer/certificates" filebeatrepo: keyring_path: '/usr/share/keyrings/wazuh.gpg' - apt: "deb [signed-by=/usr/share/keyrings/wazuh.gpg] https://packages.wazuh.com/5.x/apt/ stable main" - yum: 'https://packages.wazuh.com/5.x/yum/' + apt: "deb [signed-by=/usr/share/keyrings/wazuh.gpg] https://packages.wazuh.com/4.x/apt/ stable main" + yum: 'https://packages.wazuh.com/4.x/yum/' gpg: 'https://packages.wazuh.com/key/GPG-KEY-WAZUH' path: '/tmp/WAZUH-GPG-KEY' \ No newline at end of file diff --git a/roles/wazuh/ansible-wazuh-agent/defaults/main.yml b/roles/wazuh/ansible-wazuh-agent/defaults/main.yml index 3adcb2063..566fb0563 100644 --- a/roles/wazuh/ansible-wazuh-agent/defaults/main.yml +++ b/roles/wazuh/ansible-wazuh-agent/defaults/main.yml @@ -1,5 +1,5 @@ --- -wazuh_agent_version: 5.0.0 +wazuh_agent_version: 4.9.0 # Custom packages installation @@ -65,7 +65,7 @@ wazuh_managers: retry_interval: 5 register: yes -## Authentication Method: Enrollment section (5.x) +## Authentication Method: Enrollment section (4.x) # For more information see: # * https://documentation.wazuh.com/current/user-manual/reference/ossec-conf/client.html#enrollment diff --git a/roles/wazuh/ansible-wazuh-manager/defaults/main.yml b/roles/wazuh/ansible-wazuh-manager/defaults/main.yml index 68b8e4ba9..3cc27a889 100644 --- a/roles/wazuh/ansible-wazuh-manager/defaults/main.yml +++ b/roles/wazuh/ansible-wazuh-manager/defaults/main.yml @@ -1,5 +1,5 @@ --- -wazuh_manager_version: 5.0.0 +wazuh_manager_version: 4.9.0 wazuh_manager_fqdn: "wazuh-server" wazuh_manager_package_state: present diff --git a/roles/wazuh/check-packages/defaults/main.yml b/roles/wazuh/check-packages/defaults/main.yml index 131b85c7e..774320768 100644 --- a/roles/wazuh/check-packages/defaults/main.yml +++ b/roles/wazuh/check-packages/defaults/main.yml @@ -1,2 +1,2 @@ --- -wazuh_version: 5.0.0 +wazuh_version: 4.9.0 diff --git a/roles/wazuh/check-packages/files/packages_uri.txt b/roles/wazuh/check-packages/files/packages_uri.txt index bd59e004c..8e0fb09a7 100644 --- a/roles/wazuh/check-packages/files/packages_uri.txt +++ b/roles/wazuh/check-packages/files/packages_uri.txt @@ -1,6 +1,6 @@ yum/wazuh-manager-VERSION-1.x86_64.rpm apt/pool/main/w/wazuh-manager/wazuh-manager_VERSION-1_amd64.deb -yum/wazuh-dashboard-VERSION-1.x86_64.rpm +yum/wazuh-dashboard-VERSION-2.x86_64.rpm yum/wazuh-indexer-VERSION-1.x86_64.rpm apt/pool/main/w/wazuh-agent/wazuh-agent_VERSION-1_amd64.deb yum/wazuh-agent-VERSION-1.x86_64.rpm \ No newline at end of file diff --git a/roles/wazuh/check-packages/scripts/check_packages.sh b/roles/wazuh/check-packages/scripts/check_packages.sh index 1fbd397bf..a9a7fe424 100755 --- a/roles/wazuh/check-packages/scripts/check_packages.sh +++ b/roles/wazuh/check-packages/scripts/check_packages.sh @@ -9,7 +9,7 @@ checkPackages(){ ## Set S3 Bucket URL if [ $1 == "production" ]; then echo "production" - PACKAGES_URL=https://packages.wazuh.com/5.x/ + PACKAGES_URL=https://packages.wazuh.com/4.x/ elif [ $1 == "pre-release" ]; then echo "pre-release" PACKAGES_URL=https://packages-dev.wazuh.com/pre-release/ @@ -44,7 +44,8 @@ checkPackages(){ ## If it does not exist set EXISTS to 1 (false) if [ "$PACKAGE" != "200" ]; then EXISTS=1 - #echo $PACKAGES_URL$URI "does not exist" + # echo $PACKAGES_URL$URI "does not exist" + echo "The package: " $PACKAGES_URL$URI " was not found in the repository" return $EXISTS fi done < ../files/packages_uri_new.txt diff --git a/roles/wazuh/vars/repo.yml b/roles/wazuh/vars/repo.yml index d6e6ad1a7..88fedce20 100644 --- a/roles/wazuh/vars/repo.yml +++ b/roles/wazuh/vars/repo.yml @@ -1,20 +1,20 @@ wazuh_repo: keyring_path: '/usr/share/keyrings/wazuh.gpg' - apt: 'deb [signed-by=/usr/share/keyrings/wazuh.gpg] https://packages.wazuh.com/5.x/apt/ stable main' - yum: 'https://packages.wazuh.com/5.x/yum/' + apt: 'deb [signed-by=/usr/share/keyrings/wazuh.gpg] https://packages.wazuh.com/4.x/apt/ stable main' + yum: 'https://packages.wazuh.com/4.x/yum/' gpg: 'https://packages.wazuh.com/key/GPG-KEY-WAZUH' path: '/tmp/WAZUH-GPG-KEY' -wazuh_winagent_config_url: "https://packages.wazuh.com/5.x/windows/wazuh-agent-{{ wazuh_agent_version }}-1.msi" +wazuh_winagent_config_url: "https://packages.wazuh.com/4.x/windows/wazuh-agent-{{ wazuh_agent_version }}-1.msi" wazuh_winagent_package_name: "wazuh-agent-{{ wazuh_agent_version }}-1.msi" -wazuh_winagent_sha512_url: "https://packages.wazuh.com/5.x/checksums/wazuh/{{ wazuh_agent_version }}/wazuh-agent-{{ wazuh_agent_version }}-1.msi.sha512" -filebeat_module_package_url: https://packages.wazuh.com/5.x/filebeat +wazuh_winagent_sha512_url: "https://packages.wazuh.com/4.x/checksums/wazuh/{{ wazuh_agent_version }}/wazuh-agent-{{ wazuh_agent_version }}-1.msi.sha512" +filebeat_module_package_url: https://packages.wazuh.com/4.x/filebeat wazuh_macos_intel_package_name: "wazuh-agent-{{ wazuh_agent_version }}-1.intel64.pkg" wazuh_macos_arm_package_name: "wazuh-agent-{{ wazuh_agent_version }}-1.arm64.pkg" -wazuh_macos_intel_package_url: "https://packages.wazuh.com/5.x/macos/{{ wazuh_macos_intel_package_name }}" -wazuh_macos_arm_package_url: "https://packages.wazuh.com/5.x/macos/{{ wazuh_macos_arm_package_name }}" +wazuh_macos_intel_package_url: "https://packages.wazuh.com/4.x/macos/{{ wazuh_macos_intel_package_name }}" +wazuh_macos_arm_package_url: "https://packages.wazuh.com/4.x/macos/{{ wazuh_macos_arm_package_name }}" -certs_gen_tool_version: "5.0" +certs_gen_tool_version: "4.9" # Url of certificates generator tool certs_gen_tool_url: "https://packages.wazuh.com/{{ certs_gen_tool_version }}/wazuh-certs-tool.sh" diff --git a/roles/wazuh/vars/repo_pre-release.yml b/roles/wazuh/vars/repo_pre-release.yml index b8d5bbbd5..ebd33607d 100644 --- a/roles/wazuh/vars/repo_pre-release.yml +++ b/roles/wazuh/vars/repo_pre-release.yml @@ -14,7 +14,7 @@ wazuh_macos_arm_package_name: "wazuh-agent-{{ wazuh_agent_version }}-1.arm64.pkg wazuh_macos_intel_package_url: "https://packages-dev.wazuh.com/pre-release/{{ wazuh_macos_intel_package_name }}" wazuh_macos_arm_package_url: "https://packages-dev.wazuh.com/pre-release/macos/{{ wazuh_macos_arm_package_name }}" -certs_gen_tool_version: "5.0" +certs_gen_tool_version: "4.9" # Url of certificates generator tool certs_gen_tool_url: "https://packages-dev.wazuh.com/{{ certs_gen_tool_version }}/wazuh-certs-tool.sh" diff --git a/roles/wazuh/vars/repo_staging.yml b/roles/wazuh/vars/repo_staging.yml index 68e66d786..9aef59fa7 100644 --- a/roles/wazuh/vars/repo_staging.yml +++ b/roles/wazuh/vars/repo_staging.yml @@ -15,7 +15,7 @@ wazuh_macos_arm_package_name: "wazuh-agent-{{ wazuh_agent_version }}-1.arm64.pkg wazuh_macos_intel_package_url: "https://packages-dev.wazuh.com/staging/macos/{{ wazuh_macos_intel_package_name }}" wazuh_macos_arm_package_url: "https://packages-dev.wazuh.com/staging/macos/{{ wazuh_macos_arm_package_name }}" -certs_gen_tool_version: "5.0" +certs_gen_tool_version: "4.9" # Url of certificates generator tool certs_gen_tool_url: "https://packages-dev.wazuh.com/{{ certs_gen_tool_version }}/wazuh-certs-tool.sh" diff --git a/roles/wazuh/wazuh-dashboard/defaults/main.yml b/roles/wazuh/wazuh-dashboard/defaults/main.yml index bc37cd044..0765c65e2 100644 --- a/roles/wazuh/wazuh-dashboard/defaults/main.yml +++ b/roles/wazuh/wazuh-dashboard/defaults/main.yml @@ -8,12 +8,12 @@ dashboard_node_name: node-1 dashboard_server_host: "0.0.0.0" dashboard_server_port: "443" dashboard_server_name: "dashboard" -wazuh_version: 5.0.0 +wazuh_version: 4.9.0 indexer_cluster_nodes: - 127.0.0.1 # The Wazuh dashboard package repository -dashboard_version: "5.0.0" +dashboard_version: "4.9.0" # API credentials wazuh_api_credentials: diff --git a/roles/wazuh/wazuh-dashboard/templates/wazuh.yml.j2 b/roles/wazuh/wazuh-dashboard/templates/wazuh.yml.j2 index d3ab99a0b..5755a366b 100644 --- a/roles/wazuh/wazuh-dashboard/templates/wazuh.yml.j2 +++ b/roles/wazuh/wazuh-dashboard/templates/wazuh.yml.j2 @@ -21,7 +21,7 @@ # ------------------------------- Index patterns ------------------------------- # # Default index pattern to use. -#pattern: wazuh-alerts-5.x-* +#pattern: wazuh-alerts-4.x-* # # ----------------------------------- Checks ----------------------------------- # @@ -92,17 +92,17 @@ # Default: 900 (s) #wazuh.monitoring.frequency: 900 # -# Configure wazuh-monitoring-5.x-* indices shards and replicas. +# Configure wazuh-monitoring-4.x-* indices shards and replicas. #wazuh.monitoring.shards: 2 #wazuh.monitoring.replicas: 0 # -# Configure wazuh-monitoring-5.x-* indices custom creation interval. +# Configure wazuh-monitoring-4.x-* indices custom creation interval. # Values: h (hourly), d (daily), w (weekly), m (monthly) # Default: d #wazuh.monitoring.creation: d # # Default index pattern to use for Wazuh monitoring -#wazuh.monitoring.pattern: wazuh-monitoring-5.x-* +#wazuh.monitoring.pattern: wazuh-monitoring-4.x-* # # # ------------------------------- App privileges -------------------------------- diff --git a/roles/wazuh/wazuh-dashboard/vars/debian.yml b/roles/wazuh/wazuh-dashboard/vars/debian.yml index 77bd8e4db..940a66df9 100644 --- a/roles/wazuh/wazuh-dashboard/vars/debian.yml +++ b/roles/wazuh/wazuh-dashboard/vars/debian.yml @@ -1,2 +1,2 @@ --- -dashboard_version: 5.0.0 +dashboard_version: 4.9.0 diff --git a/roles/wazuh/wazuh-indexer/defaults/main.yml b/roles/wazuh/wazuh-indexer/defaults/main.yml index cbc3f65ed..ac304bdec 100644 --- a/roles/wazuh/wazuh-indexer/defaults/main.yml +++ b/roles/wazuh/wazuh-indexer/defaults/main.yml @@ -1,6 +1,6 @@ --- # Cluster Settings -indexer_version: 5.0.0 +indexer_version: 4.9.0 single_node: false indexer_node_name: node-1 From cd6eb73b99328684ff4a89a23d5f6bacfcefbc17 Mon Sep 17 00:00:00 2001 From: Jesus Garcia Date: Wed, 13 Nov 2024 09:05:54 -0500 Subject: [PATCH 2/2] bump to 4.10.0 --- VERSION | 2 +- roles/wazuh/ansible-filebeat-oss/defaults/main.yml | 2 +- roles/wazuh/ansible-wazuh-agent/defaults/main.yml | 2 +- roles/wazuh/ansible-wazuh-manager/defaults/main.yml | 2 +- roles/wazuh/check-packages/defaults/main.yml | 2 +- roles/wazuh/check-packages/files/packages_uri.txt | 2 +- roles/wazuh/wazuh-dashboard/defaults/main.yml | 4 ++-- roles/wazuh/wazuh-dashboard/vars/debian.yml | 2 +- roles/wazuh/wazuh-indexer/defaults/main.yml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/VERSION b/VERSION index 7261ef42f..7effa9b3c 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -WAZUH-ANSIBLE_VERSION="v4.9.0" +WAZUH-ANSIBLE_VERSION="v4.10.0" REVISION="40907" diff --git a/roles/wazuh/ansible-filebeat-oss/defaults/main.yml b/roles/wazuh/ansible-filebeat-oss/defaults/main.yml index ff1dfc7f7..8629f41a8 100644 --- a/roles/wazuh/ansible-filebeat-oss/defaults/main.yml +++ b/roles/wazuh/ansible-filebeat-oss/defaults/main.yml @@ -1,7 +1,7 @@ --- filebeat_version: 7.10.2 -wazuh_template_branch: v4.9.0 +wazuh_template_branch: 4.10.0 filebeat_node_name: node-1 diff --git a/roles/wazuh/ansible-wazuh-agent/defaults/main.yml b/roles/wazuh/ansible-wazuh-agent/defaults/main.yml index 566fb0563..a0767d207 100644 --- a/roles/wazuh/ansible-wazuh-agent/defaults/main.yml +++ b/roles/wazuh/ansible-wazuh-agent/defaults/main.yml @@ -1,5 +1,5 @@ --- -wazuh_agent_version: 4.9.0 +wazuh_agent_version: 4.10.0 # Custom packages installation diff --git a/roles/wazuh/ansible-wazuh-manager/defaults/main.yml b/roles/wazuh/ansible-wazuh-manager/defaults/main.yml index 3cc27a889..dc130eeb8 100644 --- a/roles/wazuh/ansible-wazuh-manager/defaults/main.yml +++ b/roles/wazuh/ansible-wazuh-manager/defaults/main.yml @@ -1,5 +1,5 @@ --- -wazuh_manager_version: 4.9.0 +wazuh_manager_version: 4.10.0 wazuh_manager_fqdn: "wazuh-server" wazuh_manager_package_state: present diff --git a/roles/wazuh/check-packages/defaults/main.yml b/roles/wazuh/check-packages/defaults/main.yml index 774320768..2108c5edc 100644 --- a/roles/wazuh/check-packages/defaults/main.yml +++ b/roles/wazuh/check-packages/defaults/main.yml @@ -1,2 +1,2 @@ --- -wazuh_version: 4.9.0 +wazuh_version: 4.10.0 diff --git a/roles/wazuh/check-packages/files/packages_uri.txt b/roles/wazuh/check-packages/files/packages_uri.txt index 8e0fb09a7..bd59e004c 100644 --- a/roles/wazuh/check-packages/files/packages_uri.txt +++ b/roles/wazuh/check-packages/files/packages_uri.txt @@ -1,6 +1,6 @@ yum/wazuh-manager-VERSION-1.x86_64.rpm apt/pool/main/w/wazuh-manager/wazuh-manager_VERSION-1_amd64.deb -yum/wazuh-dashboard-VERSION-2.x86_64.rpm +yum/wazuh-dashboard-VERSION-1.x86_64.rpm yum/wazuh-indexer-VERSION-1.x86_64.rpm apt/pool/main/w/wazuh-agent/wazuh-agent_VERSION-1_amd64.deb yum/wazuh-agent-VERSION-1.x86_64.rpm \ No newline at end of file diff --git a/roles/wazuh/wazuh-dashboard/defaults/main.yml b/roles/wazuh/wazuh-dashboard/defaults/main.yml index 0765c65e2..868b7193f 100644 --- a/roles/wazuh/wazuh-dashboard/defaults/main.yml +++ b/roles/wazuh/wazuh-dashboard/defaults/main.yml @@ -8,12 +8,12 @@ dashboard_node_name: node-1 dashboard_server_host: "0.0.0.0" dashboard_server_port: "443" dashboard_server_name: "dashboard" -wazuh_version: 4.9.0 +wazuh_version: 4.10.0 indexer_cluster_nodes: - 127.0.0.1 # The Wazuh dashboard package repository -dashboard_version: "4.9.0" +dashboard_version: "4.10.0" # API credentials wazuh_api_credentials: diff --git a/roles/wazuh/wazuh-dashboard/vars/debian.yml b/roles/wazuh/wazuh-dashboard/vars/debian.yml index 940a66df9..c235dbc4f 100644 --- a/roles/wazuh/wazuh-dashboard/vars/debian.yml +++ b/roles/wazuh/wazuh-dashboard/vars/debian.yml @@ -1,2 +1,2 @@ --- -dashboard_version: 4.9.0 +dashboard_version: 4.10.0 diff --git a/roles/wazuh/wazuh-indexer/defaults/main.yml b/roles/wazuh/wazuh-indexer/defaults/main.yml index ac304bdec..687809618 100644 --- a/roles/wazuh/wazuh-indexer/defaults/main.yml +++ b/roles/wazuh/wazuh-indexer/defaults/main.yml @@ -1,6 +1,6 @@ --- # Cluster Settings -indexer_version: 4.9.0 +indexer_version: 4.10.0 single_node: false indexer_node_name: node-1