Skip to content

Commit

Permalink
fix: remove unnecesary repository installation tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
santipadilla committed Jun 27, 2024
1 parent f391ccb commit 925d6fe
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 136 deletions.
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
28 changes: 0 additions & 28 deletions provisioning/roles/wazuh/ansible-wazuh-manager/defaults/main.yml
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 All @@ -10,32 +8,6 @@ wazuh_custom_packages_installation_manager_enabled: false
wazuh_custom_packages_installation_manager_deb_url: "https://s3-us-west-1.amazonaws.com/packages-dev.wazuh.com/"
wazuh_custom_packages_installation_manager_rpm_url: "https://s3-us-west-1.amazonaws.com/packages-dev.wazuh.com/"

# Sources installation
wazuh_manager_sources_installation:
enabled: false
branch: "v4.4.4"
user_language: "en"
user_no_stop: "y"
user_install_type: "server"
user_dir: "/var/ossec"
user_delete_dir: null
user_enable_active_response: null
user_enable_syscheck: "y"
user_enable_rootcheck: "y"
user_enable_openscap: "n"
user_enable_authd: "y"
user_generate_authd_cert: null
user_update: "y"
user_binaryinstall: null
user_enable_email: "n"
user_auto_start: "y"
user_email_address: null
user_email_smpt: null
user_enable_syslog: "n"
user_white_list: "n"
user_ca_store: null
threads: "2"

wazuh_dir: "/var/ossec"

##########################################
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
3 changes: 0 additions & 3 deletions provisioning/roles/wazuh/wazuh-dashboard/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ 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
8 changes: 0 additions & 8 deletions provisioning/roles/wazuh/wazuh-indexer/tasks/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@
- wget
- unzip

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

tags:
- install

Expand Down

0 comments on commit 925d6fe

Please sign in to comment.