Update conditionals in Managers tasks to filter installation from packages
This commit is contained in:
parent
7fb76b42e6
commit
bf6f72039c
@ -24,6 +24,7 @@
|
|||||||
- ansible_distribution == "Ubuntu"
|
- ansible_distribution == "Ubuntu"
|
||||||
- ansible_distribution_major_version | int == 14
|
- ansible_distribution_major_version | int == 14
|
||||||
- not wazuh_manager_sources_installation.enabled or not wazuh_api_sources_installation.enabled
|
- not wazuh_manager_sources_installation.enabled or not wazuh_api_sources_installation.enabled
|
||||||
|
- not wazuh_custom_packages_installation_manager_enabled or not wazuh_custom_packages_installation_manager_enabled
|
||||||
|
|
||||||
- name: Debian/Ubuntu | Installing Wazuh repository key
|
- name: Debian/Ubuntu | Installing Wazuh repository key
|
||||||
apt_key:
|
apt_key:
|
||||||
@ -32,6 +33,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_manager_sources_installation.enabled or not wazuh_api_sources_installation.enabled
|
- not wazuh_manager_sources_installation.enabled or not wazuh_api_sources_installation.enabled
|
||||||
|
- not wazuh_custom_packages_installation_manager_enabled or not wazuh_custom_packages_installation_manager_enabled
|
||||||
|
|
||||||
- name: Debian/Ubuntu | Add Wazuh repositories
|
- name: Debian/Ubuntu | Add Wazuh repositories
|
||||||
apt_repository:
|
apt_repository:
|
||||||
@ -42,6 +44,7 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
- not wazuh_manager_sources_installation.enabled or not wazuh_api_sources_installation.enabled
|
- not wazuh_manager_sources_installation.enabled or not wazuh_api_sources_installation.enabled
|
||||||
|
- not wazuh_custom_packages_installation_manager_enabled or not wazuh_custom_packages_installation_manager_enabled
|
||||||
|
|
||||||
- name: Debian/Ubuntu | Set Distribution CIS filename for Debian/Ubuntu
|
- name: Debian/Ubuntu | Set Distribution CIS filename for Debian/Ubuntu
|
||||||
set_fact:
|
set_fact:
|
||||||
@ -106,11 +109,16 @@
|
|||||||
tags: init
|
tags: init
|
||||||
when:
|
when:
|
||||||
- not wazuh_manager_sources_installation.enabled
|
- not wazuh_manager_sources_installation.enabled
|
||||||
|
- not wazuh_custom_packages_installation_manager_enabled
|
||||||
|
|
||||||
- include_tasks: "installation_from_sources.yml"
|
- include_tasks: "installation_from_sources.yml"
|
||||||
when:
|
when:
|
||||||
- wazuh_manager_sources_installation.enabled or wazuh_api_sources_installation.enabled
|
- wazuh_manager_sources_installation.enabled or wazuh_api_sources_installation.enabled
|
||||||
|
|
||||||
|
- include_tasks: "installation_from_custom_packages.yml"
|
||||||
|
when:
|
||||||
|
- wazuh_custom_packages_installation_manager_enabled or not wazuh_custom_packages_installation_manager_enabled
|
||||||
|
|
||||||
- name: Debian/Ubuntu | Install wazuh-api
|
- name: Debian/Ubuntu | Install wazuh-api
|
||||||
apt:
|
apt:
|
||||||
name:
|
name:
|
||||||
@ -122,4 +130,5 @@
|
|||||||
until: wazuh_manager_main_packages_installed is succeeded
|
until: wazuh_manager_main_packages_installed is succeeded
|
||||||
tags: init
|
tags: init
|
||||||
when:
|
when:
|
||||||
- not wazuh_api_sources_installation.enabled
|
- not wazuh_api_sources_installation.enabled
|
||||||
|
- not wazuh_custom_packages_installation_manager_enabled
|
||||||
@ -11,6 +11,7 @@
|
|||||||
- (ansible_os_family|lower == 'redhat') and (ansible_distribution|lower != 'amazon')
|
- (ansible_os_family|lower == 'redhat') and (ansible_distribution|lower != 'amazon')
|
||||||
- (ansible_distribution_major_version|int <= 5)
|
- (ansible_distribution_major_version|int <= 5)
|
||||||
- not wazuh_manager_sources_installation.enabled or not wazuh_api_sources_installation.enabled
|
- not wazuh_manager_sources_installation.enabled or not wazuh_api_sources_installation.enabled
|
||||||
|
- not wazuh_custom_packages_installation_manager_enabled or not wazuh_custom_packages_installation_api_enabled
|
||||||
register: repo_v5_manager_installed
|
register: repo_v5_manager_installed
|
||||||
|
|
||||||
- name: RedHat/CentOS/Fedora | Install Wazuh repo
|
- name: RedHat/CentOS/Fedora | Install Wazuh repo
|
||||||
@ -24,6 +25,7 @@
|
|||||||
when:
|
when:
|
||||||
- repo_v5_manager_installed is skipped
|
- repo_v5_manager_installed is skipped
|
||||||
- not wazuh_manager_sources_installation.enabled or not wazuh_api_sources_installation.enabled
|
- not wazuh_manager_sources_installation.enabled or not wazuh_api_sources_installation.enabled
|
||||||
|
- not wazuh_custom_packages_installation_manager_enabled or not wazuh_custom_packages_installation_api_enabled
|
||||||
|
|
||||||
- name: RedHat/CentOS/Fedora | Install openscap
|
- name: RedHat/CentOS/Fedora | Install openscap
|
||||||
package: name={{ item }} state=present
|
package: name={{ item }} state=present
|
||||||
@ -118,6 +120,7 @@
|
|||||||
when:
|
when:
|
||||||
- ansible_os_family|lower == "redhat"
|
- ansible_os_family|lower == "redhat"
|
||||||
- not wazuh_manager_sources_installation.enabled
|
- not wazuh_manager_sources_installation.enabled
|
||||||
|
- not wazuh_custom_packages_installation_manager_enabled
|
||||||
tags:
|
tags:
|
||||||
- init
|
- init
|
||||||
|
|
||||||
@ -125,6 +128,10 @@
|
|||||||
when:
|
when:
|
||||||
- wazuh_manager_sources_installation.enabled or wazuh_api_sources_installation.enabled
|
- wazuh_manager_sources_installation.enabled or wazuh_api_sources_installation.enabled
|
||||||
|
|
||||||
|
- include_tasks: "../tasks/installation_from_custom_packages.yml"
|
||||||
|
when:
|
||||||
|
- wazuh_custom_packages_installation_manager_enabled or wazuh_custom_packages_installation_api_enabled
|
||||||
|
|
||||||
- name: CentOS/RedHat/Amazon | Install wazuh-api
|
- name: CentOS/RedHat/Amazon | Install wazuh-api
|
||||||
package:
|
package:
|
||||||
name: "wazuh-api-{{ wazuh_manager_version }}"
|
name: "wazuh-api-{{ wazuh_manager_version }}"
|
||||||
@ -134,6 +141,7 @@
|
|||||||
when:
|
when:
|
||||||
- ansible_os_family|lower == "redhat"
|
- ansible_os_family|lower == "redhat"
|
||||||
- not wazuh_api_sources_installation.enabled
|
- not wazuh_api_sources_installation.enabled
|
||||||
|
- not wazuh_custom_packages_installation_api_enabled
|
||||||
tags:
|
tags:
|
||||||
- init
|
- init
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user