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 == "Ubuntu"
|
||||||
- ansible_distribution_major_version | int == 14
|
- ansible_distribution_major_version | int == 14
|
||||||
- not wazuh_agent_sources_installation.enabled
|
- not wazuh_agent_sources_installation.enabled
|
||||||
|
- not wazuh_custom_packages_installation_agent_enabled
|
||||||
|
|
||||||
- name: Debian/Ubuntu | Installing Wazuh repository key
|
- name: Debian/Ubuntu | Installing Wazuh repository key
|
||||||
apt_key:
|
apt_key:
|
||||||
@ -29,6 +30,7 @@
|
|||||||
when:
|
when:
|
||||||
- not (ansible_distribution == "Ubuntu" and ansible_distribution_major_version | int == 14)
|
- not (ansible_distribution == "Ubuntu" and ansible_distribution_major_version | int == 14)
|
||||||
- not wazuh_agent_sources_installation.enabled
|
- not wazuh_agent_sources_installation.enabled
|
||||||
|
- not wazuh_custom_packages_installation_agent_enabled
|
||||||
|
|
||||||
- name: Debian/Ubuntu | Add Wazuh repositories
|
- name: Debian/Ubuntu | Add Wazuh repositories
|
||||||
apt_repository:
|
apt_repository:
|
||||||
@ -38,6 +40,7 @@
|
|||||||
update_cache: true
|
update_cache: true
|
||||||
when:
|
when:
|
||||||
- not wazuh_agent_sources_installation.enabled
|
- not wazuh_agent_sources_installation.enabled
|
||||||
|
- not wazuh_custom_packages_installation_agent_enabled
|
||||||
|
|
||||||
- name: Debian/Ubuntu | Set Distribution CIS filename for debian
|
- name: Debian/Ubuntu | Set Distribution CIS filename for debian
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|||||||
@ -9,6 +9,10 @@
|
|||||||
when:
|
when:
|
||||||
- wazuh_agent_sources_installation.enabled
|
- 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
|
- name: Linux CentOS/RedHat | Install wazuh-agent
|
||||||
package:
|
package:
|
||||||
name: wazuh-agent-{{ wazuh_agent_version }}
|
name: wazuh-agent-{{ wazuh_agent_version }}
|
||||||
@ -18,6 +22,7 @@
|
|||||||
when:
|
when:
|
||||||
- ansible_os_family|lower == "redhat"
|
- ansible_os_family|lower == "redhat"
|
||||||
- not wazuh_agent_sources_installation.enabled
|
- not wazuh_agent_sources_installation.enabled
|
||||||
|
- not wazuh_custom_packages_installation_agent_enabled
|
||||||
tags:
|
tags:
|
||||||
- init
|
- init
|
||||||
|
|
||||||
@ -29,6 +34,7 @@
|
|||||||
when:
|
when:
|
||||||
- ansible_os_family|lower != "redhat"
|
- ansible_os_family|lower != "redhat"
|
||||||
- not wazuh_agent_sources_installation.enabled
|
- not wazuh_agent_sources_installation.enabled
|
||||||
|
- not wazuh_custom_packages_installation_agent_enabled
|
||||||
tags:
|
tags:
|
||||||
- init
|
- init
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,8 @@
|
|||||||
when:
|
when:
|
||||||
- (ansible_facts['os_family']|lower == 'redhat') and (ansible_distribution|lower != 'amazon')
|
- (ansible_facts['os_family']|lower == 'redhat') and (ansible_distribution|lower != 'amazon')
|
||||||
- (ansible_distribution_major_version|int <= 5)
|
- (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
|
register: repo_v5_installed
|
||||||
|
|
||||||
- name: RedHat/CentOS/Fedora | Install Wazuh repo
|
- name: RedHat/CentOS/Fedora | Install Wazuh repo
|
||||||
@ -24,6 +25,7 @@
|
|||||||
when:
|
when:
|
||||||
- repo_v5_installed is skipped
|
- repo_v5_installed is skipped
|
||||||
- not wazuh_agent_sources_installation.enabled
|
- not wazuh_agent_sources_installation.enabled
|
||||||
|
- not wazuh_custom_packages_installation_agent_enabled
|
||||||
|
|
||||||
- name: RedHat/CentOS/Fedora | download Oracle Java RPM
|
- name: RedHat/CentOS/Fedora | download Oracle Java RPM
|
||||||
get_url:
|
get_url:
|
||||||
@ -34,7 +36,7 @@
|
|||||||
until: oracle_java_task_rpm_download is succeeded
|
until: oracle_java_task_rpm_download is succeeded
|
||||||
when:
|
when:
|
||||||
- wazuh_agent_config.cis_cat.disable == 'no'
|
- wazuh_agent_config.cis_cat.disable == 'no'
|
||||||
- wazuh_agent_config.cis_cat.install_java == 'yes'
|
- wazuh_agent_config.cis_cat.install_java == 'yes'
|
||||||
tags:
|
tags:
|
||||||
- init
|
- init
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user