Update Agent conditionals to make them work with custom packages install
This commit is contained in:
parent
281d54557a
commit
8f0d54b274
@ -21,6 +21,7 @@
|
||||
- ansible_distribution == "Ubuntu"
|
||||
- ansible_distribution_major_version | int == 14
|
||||
- not wazuh_agent_sources_installation.enabled
|
||||
- not wazuh_custom_packages_installation_agent_enabled
|
||||
|
||||
- name: Debian/Ubuntu | Installing Wazuh repository key
|
||||
apt_key:
|
||||
@ -29,6 +30,7 @@
|
||||
when:
|
||||
- not (ansible_distribution == "Ubuntu" and ansible_distribution_major_version | int == 14)
|
||||
- not wazuh_agent_sources_installation.enabled
|
||||
- not wazuh_custom_packages_installation_agent_enabled
|
||||
|
||||
- name: Debian/Ubuntu | Add Wazuh repositories
|
||||
apt_repository:
|
||||
@ -38,6 +40,7 @@
|
||||
update_cache: true
|
||||
when:
|
||||
- not wazuh_agent_sources_installation.enabled
|
||||
- not wazuh_custom_packages_installation_agent_enabled
|
||||
|
||||
- name: Debian/Ubuntu | Set Distribution CIS filename for debian
|
||||
set_fact:
|
||||
|
||||
@ -9,6 +9,10 @@
|
||||
when:
|
||||
- wazuh_agent_sources_installation.enabled
|
||||
|
||||
- include_tasks: "installation_from_custom_packages.yml"
|
||||
when:
|
||||
- wazuh_custom_packages_installation_agent_enabled
|
||||
|
||||
- name: Linux CentOS/RedHat | Install wazuh-agent
|
||||
package:
|
||||
name: wazuh-agent-{{ wazuh_agent_version }}
|
||||
@ -18,6 +22,7 @@
|
||||
when:
|
||||
- ansible_os_family|lower == "redhat"
|
||||
- not wazuh_agent_sources_installation.enabled
|
||||
- not wazuh_custom_packages_installation_agent_enabled
|
||||
tags:
|
||||
- init
|
||||
|
||||
@ -29,6 +34,7 @@
|
||||
when:
|
||||
- ansible_os_family|lower != "redhat"
|
||||
- not wazuh_agent_sources_installation.enabled
|
||||
- not wazuh_custom_packages_installation_agent_enabled
|
||||
tags:
|
||||
- init
|
||||
|
||||
|
||||
@ -10,7 +10,8 @@
|
||||
when:
|
||||
- (ansible_facts['os_family']|lower == 'redhat') and (ansible_distribution|lower != 'amazon')
|
||||
- (ansible_distribution_major_version|int <= 5)
|
||||
- not wazuh_agent_sources_installation.enabled or not wazuh_api_sources_installation.enabled
|
||||
- not wazuh_agent_sources_installation.enabled
|
||||
- not wazuh_custom_packages_installation_agent_enabled
|
||||
register: repo_v5_installed
|
||||
|
||||
- name: RedHat/CentOS/Fedora | Install Wazuh repo
|
||||
@ -24,6 +25,7 @@
|
||||
when:
|
||||
- repo_v5_installed is skipped
|
||||
- not wazuh_agent_sources_installation.enabled
|
||||
- not wazuh_custom_packages_installation_agent_enabled
|
||||
|
||||
- name: RedHat/CentOS/Fedora | download Oracle Java RPM
|
||||
get_url:
|
||||
@ -34,7 +36,7 @@
|
||||
until: oracle_java_task_rpm_download is succeeded
|
||||
when:
|
||||
- wazuh_agent_config.cis_cat.disable == 'no'
|
||||
- wazuh_agent_config.cis_cat.install_java == 'yes'
|
||||
- wazuh_agent_config.cis_cat.install_java == 'yes'
|
||||
tags:
|
||||
- init
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user