Skip to content

Commit

Permalink
Merge pull request #5517 from wazuh/enhancement/5509-remove-hardcoded…
Browse files Browse the repository at this point in the history
…-branch-references

Remove hardcoded references to branch in provision playbooks
  • Loading branch information
juliamagan authored Jul 1, 2024
2 parents 08db0f4 + c20dfd7 commit 80ad6d5
Show file tree
Hide file tree
Showing 21 changed files with 8 additions and 258 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.

### Changed

- Remove hardcoded references in provision playbook for E2E tests ([#5517](https://github.com/wazuh/wazuh-qa/pull/5517)) \- (Framework)
- Fix test_consistency_initial_scans by adding a 30-minute wait before collecting vulnerabilities. ([#5507](https://github.com/wazuh/wazuh-qa/pull/5507)) \- (Tests)

## [4.8.0] - 12/06/2024
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
filebeat_version: 7.10.2

wazuh_template_branch: 4.8.1
wazuh_template_branch: "{{ SOURCE_REFERENCE }}"

filebeat_node_name: node-1

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---

wazuh_agent_version: 4.8.0

# Custom packages installation

wazuh_custom_packages_installation_agent_enabled: false
Expand Down Expand Up @@ -56,8 +54,6 @@ wazuh_winagent_config:
check_md5: True
md5: a03806b7302767d0470d65d3f103fabb

wazuh_winagent_config_url: https://packages.wazuh.com/4.x/windows/wazuh-agent-4.8.0-1.msi
wazuh_winagent_package_name: wazuh-agent-4.8.0-1.msi
wazuh_winagent_package_name_generic: wazuh-agent.msi
wazuh_dir: "/var/ossec"
macos_wazuh_dir: "/Library/Ossec"
Expand Down
25 changes: 0 additions & 25 deletions provisioning/roles/wazuh/ansible-wazuh-agent/tasks/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,6 @@
when:
- wazuh_custom_packages_installation_agent_enabled

- name: Linux CentOS/RedHat | Install wazuh-agent
yum:
name: wazuh-agent-{{ wazuh_agent_version }}
state: present
lock_timeout: '{{ wazuh_agent_yum_lock_timeout }}'
when:
- ansible_os_family|lower == "redhat"
- not wazuh_agent_sources_installation.enabled
- not wazuh_custom_packages_installation_agent_enabled
tags:
- init

- name: Linux Debian | Install wazuh-agent
apt:
name: "wazuh-agent={{ wazuh_agent_version }}-*"
state: present
cache_valid_time: 3600
when:
- ansible_os_family|lower != "redhat"
- not wazuh_agent_sources_installation.enabled
- not wazuh_custom_packages_installation_agent_enabled
- not ansible_check_mode
tags:
- init

- name: Linux | Check if client.keys exists
stat:
path: "{{ wazuh_dir }}/etc/client.keys"
Expand Down
37 changes: 0 additions & 37 deletions provisioning/roles/wazuh/ansible-wazuh-agent/tasks/Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,6 @@
when:
- not check_path.stat.exists

- name: Windows | Check if Wazuh installer is already downloaded
win_stat:
path: "{{ wazuh_winagent_config.download_dir }}{{ wazuh_winagent_package_name }}"
register: wazuh_package_downloaded

- name: Windows | Download Wazuh Agent package
win_get_url:
url: "{{ wazuh_winagent_config_url }}"
dest: "{{ wazuh_winagent_config.download_dir }}"
when:
- not wazuh_package_downloaded.stat.exists
- not wazuh_custom_packages_installation_agent_enabled

- name: Windows | Verify the Wazuh Agent installer
win_stat:
path: "{{ wazuh_winagent_config.download_dir }}{{ wazuh_winagent_package_name }}"
get_checksum: true
checksum_algorithm: md5
register: wazuh_agent_status
failed_when:
- wazuh_agent_status.stat.checksum != wazuh_winagent_config.md5
when:
- wazuh_winagent_config.check_md5
- not wazuh_custom_packages_installation_agent_enabled


- name: Windows | Install Agent if not already installed
win_package:
path: "{{ wazuh_winagent_config.download_dir }}{{ wazuh_winagent_package_name }}"
state: present
when: not wazuh_custom_packages_installation_agent_enabled

- name: Windows | Check if client.keys exists
win_stat:
path: "{{ wazuh_agent_win_path }}client.keys"
Expand Down Expand Up @@ -94,11 +62,6 @@
tags:
- config

- name: Windows | Delete downloaded Wazuh agent installer file
win_file:
path: "{{ wazuh_winagent_config.download_dir }}{{ wazuh_winagent_package_name }}"
state: absent

- include_tasks: "installation_from_custom_packages.yml"
when:
- wazuh_custom_packages_installation_agent_enabled
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---

wazuh_manager_version: 4.8.0

wazuh_manager_fqdn: "wazuh-server"
wazuh_manager_package_state: present

Expand Down
10 changes: 0 additions & 10 deletions provisioning/roles/wazuh/ansible-wazuh-manager/tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,6 @@
state: present
when: wazuh_manager_sources_installation.enabled

- name: Debian/Ubuntu | Install wazuh-manager
apt:
name:
- "wazuh-manager={{ wazuh_manager_version }}-*"
state: present
tags: init
when:
- not wazuh_manager_sources_installation.enabled
- not wazuh_custom_packages_installation_manager_enabled

- include_tasks: "installation_from_sources.yml"
when:
- wazuh_manager_sources_installation.enabled
Expand Down
13 changes: 0 additions & 13 deletions provisioning/roles/wazuh/ansible-wazuh-manager/tasks/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,6 @@
state: present
when: wazuh_manager_sources_installation.enabled

- name: CentOS/RedHat/Amazon | Install wazuh-manager
package:
name: "wazuh-manager-{{ wazuh_manager_version }}"
state: "{{ wazuh_manager_package_state }}"
register: wazuh_manager_main_packages_installed
until: wazuh_manager_main_packages_installed is succeeded
when:
- ansible_os_family|lower == "redhat"
- not wazuh_manager_sources_installation.enabled
- not wazuh_custom_packages_installation_manager_enabled
tags:
- init

- include_tasks: "../tasks/installation_from_sources.yml"
when:
- wazuh_manager_sources_installation.enabled
Expand Down
2 changes: 0 additions & 2 deletions provisioning/roles/wazuh/check-packages/defaults/main.yml

This file was deleted.

80 changes: 0 additions & 80 deletions provisioning/roles/wazuh/check-packages/scripts/check_packages.sh

This file was deleted.

11 changes: 0 additions & 11 deletions provisioning/roles/wazuh/check-packages/tasks/main.yml

This file was deleted.

6 changes: 2 additions & 4 deletions provisioning/roles/wazuh/vars/repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ wazuh_repo:
yum: 'https://packages-dev.wazuh.com/4.x/yum/'
gpg: 'https://packages-dev.wazuh.com/key/GPG-KEY-WAZUH'
key_id: '0DCFCA5547B19D2A6099506096B3EE5F29111145'
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"

certs_gen_tool_version: 4.8
certs_gen_tool_version: "{{ CERTS_GEN_TOOL_VERSION }}"

# Url of certificates generator tool
certs_gen_tool_url: "https://packages-dev.wazuh.com/{{ certs_gen_tool_version }}/wazuh-certs-tool.sh"
certs_gen_tool_url: "https://packages-dev.wazuh.com/{{ certs_gen_tool_version }}/wazuh-certs-tool.sh"
6 changes: 2 additions & 4 deletions provisioning/roles/wazuh/vars/repo_pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ wazuh_repo:
yum: 'https://packages-dev.wazuh.com/pre-release/yum/'
gpg: 'https://packages-dev.wazuh.com/key/GPG-KEY-WAZUH'
key_id: '0DCFCA5547B19D2A6099506096B3EE5F29111145'
wazuh_winagent_config_url: "https://packages-dev.wazuh.com/pre-release/windows/wazuh-agent-{{ wazuh_agent_version }}-1.msi"
wazuh_winagent_package_name: "wazuh-agent-{{ wazuh_agent_version }}-1.msi"

certs_gen_tool_version: 4.8
certs_gen_tool_version: "{{ CERTS_GEN_TOOL_VERSION }}"

# Url of certificates generator tool
certs_gen_tool_url: "https://packages-dev.wazuh.com/{{ certs_gen_tool_version }}/wazuh-certs-tool.sh"
certs_gen_tool_url: "https://packages-dev.wazuh.com/{{ certs_gen_tool_version }}/wazuh-certs-tool.sh"
6 changes: 2 additions & 4 deletions provisioning/roles/wazuh/vars/repo_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ wazuh_repo:
yum: 'https://packages-dev.wazuh.com/staging/yum/'
gpg: 'https://packages-dev.wazuh.com/key/GPG-KEY-WAZUH'
key_id: '0DCFCA5547B19D2A6099506096B3EE5F29111145'
wazuh_winagent_config_url: "https://packages-dev.wazuh.com/staging/windows/wazuh-agent-{{ wazuh_agent_version }}-1.msi"
wazuh_winagent_package_name: "wazuh-agent-{{ wazuh_agent_version }}-1.msi"

certs_gen_tool_version: 4.8
certs_gen_tool_version: "{{ CERTS_GEN_TOOL_VERSION }}"

# Url of certificates generator tool
certs_gen_tool_url: "https://packages-dev.wazuh.com/{{ certs_gen_tool_version }}/wazuh-certs-tool.sh"
certs_gen_tool_url: "https://packages-dev.wazuh.com/{{ certs_gen_tool_version }}/wazuh-certs-tool.sh"
4 changes: 0 additions & 4 deletions provisioning/roles/wazuh/wazuh-dashboard/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,9 @@ dashboard_node_name: node-1
dashboard_server_host: "0.0.0.0"
dashboard_server_port: "443"
dashboard_server_name: "dashboard"
wazuh_version: 4.8.0
indexer_cluster_nodes:
- 127.0.0.1

# The Wazuh dashboard package repository
dashboard_version: "4.8.0"

# API credentials
wazuh_api_credentials:
- id: "default"
Expand Down
11 changes: 0 additions & 11 deletions provisioning/roles/wazuh/wazuh-dashboard/tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,6 @@
]
state: present

- name: Install Wazuh dashboard
apt:
name: "wazuh-dashboard={{ dashboard_version }}-*"
state: present
update_cache: yes
register: install

tags:
- install
when: not wazuh_custom_packages_installation_dashboard_enabled

- include_tasks: "install_from_custom_package.yml"
when:
- wazuh_custom_packages_installation_dashboard_enabled
11 changes: 0 additions & 11 deletions provisioning/roles/wazuh/wazuh-dashboard/tasks/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,6 @@
state: present
ignore_errors: yes

- name: Install Wazuh dashboard
package:
name: "wazuh-dashboard-{{ dashboard_version }}"
state: present
update_cache: yes
register: install

tags:
- install
when: not wazuh_custom_packages_installation_dashboard_enabled

- include_tasks: "install_from_custom_package.yml"
when:
- wazuh_custom_packages_installation_dashboard_enabled
2 changes: 0 additions & 2 deletions provisioning/roles/wazuh/wazuh-dashboard/vars/debian.yml

This file was deleted.

1 change: 0 additions & 1 deletion provisioning/roles/wazuh/wazuh-indexer/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ wazuh_custom_packages_installation_indexer_deb_url: ""
wazuh_custom_packages_installation_indexer_rpm_url: ""

# Cluster Settings
indexer_version: 4.8.0

single_node: false
indexer_node_name: node-1
Expand Down
24 changes: 0 additions & 24 deletions provisioning/roles/wazuh/wazuh-indexer/tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,6 @@
]
state: present

- name: Install wazuh-indexer
block:
- name: Add Wazuh indexer repository
block:
- name: Add apt repository signing key
apt_key:
url: "{{ wazuh_repo.gpg }}"
state: present

- name: Add Wazuh indexer repository
apt_repository:
repo: "{{ wazuh_repo.apt }}"
state: present
filename: 'wazuh-indexer'
update_cache: yes

- name: Install Wazuh indexer
apt:
name: wazuh-indexer={{ indexer_version }}-1
state: present
register: install
tags: install
when: not wazuh_custom_packages_installation_indexer_enabled

- include_tasks: "install_from_custom_package.yml"
when:
- wazuh_custom_packages_installation_indexer_enabled
Loading

0 comments on commit 80ad6d5

Please sign in to comment.