Update conditionals to use new variables
This commit is contained in:
parent
df016d53c6
commit
46b4d34695
@ -2,7 +2,7 @@
|
||||
|
||||
- include_tasks: "installation_from_sources"
|
||||
when:
|
||||
- wazuh_agent_config.repo.sources == "true"
|
||||
- wazuh_sources_installation.enabled
|
||||
|
||||
- name: Debian/Ubuntu | Install apt-transport-https and ca-certificates
|
||||
apt:
|
||||
@ -39,7 +39,7 @@
|
||||
state: present
|
||||
update_cache: true
|
||||
when:
|
||||
- wazuh_agent_config.repo.sources == "false"
|
||||
- not wazuh_sources_installation.enabled
|
||||
|
||||
- name: Debian/Ubuntu | Set Distribution CIS filename for debian
|
||||
set_fact:
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
poll: 30
|
||||
when:
|
||||
- ansible_os_family|lower == "redhat"
|
||||
- not wazuh_sources_installation.enabled
|
||||
tags:
|
||||
- init
|
||||
|
||||
@ -23,6 +24,7 @@
|
||||
cache_valid_time: 3600
|
||||
when:
|
||||
- ansible_os_family|lower != "redhat"
|
||||
- not wazuh_sources_installation.enabled
|
||||
tags:
|
||||
- init
|
||||
|
||||
@ -192,7 +194,11 @@
|
||||
tags: config
|
||||
|
||||
- include_tasks: "RMRedHat.yml"
|
||||
when: ansible_os_family == "RedHat"
|
||||
when:
|
||||
- ansible_os_family == "RedHat"
|
||||
- not wazuh_sources_installation.enabled
|
||||
|
||||
- include_tasks: "RMDebian.yml"
|
||||
when: ansible_os_family == "Debian"
|
||||
when:
|
||||
- ansible_os_family == "Debian"
|
||||
- not wazuh_sources_installation.enabled
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
- include_tasks: "installation_from_sources"
|
||||
when:
|
||||
- wazuh_agent_config.repo.sources == "true"
|
||||
- wazuh_sources_installation.enabled
|
||||
|
||||
- name: RedHat/CentOS 5 | Install Wazuh repo
|
||||
yum_repository:
|
||||
@ -15,7 +15,7 @@
|
||||
when:
|
||||
- (ansible_facts['os_family']|lower == 'redhat') and (ansible_distribution|lower != 'amazon')
|
||||
- (ansible_distribution_major_version|int <= 5)
|
||||
- wazuh_agent_config.repo.sources == "false"
|
||||
- not wazuh_sources_installation.enabled
|
||||
register: repo_v5_installed
|
||||
|
||||
- name: RedHat/CentOS/Fedora | Install Wazuh repo
|
||||
@ -28,7 +28,7 @@
|
||||
changed_when: false
|
||||
when:
|
||||
- repo_v5_installed is skipped
|
||||
- wazuh_agent_config.repo.sources == "false"
|
||||
- not wazuh_sources_installation.enabled
|
||||
|
||||
- name: RedHat/CentOS/Fedora | download Oracle Java RPM
|
||||
get_url:
|
||||
|
||||
@ -23,12 +23,14 @@
|
||||
when:
|
||||
- ansible_distribution == "Ubuntu"
|
||||
- ansible_distribution_major_version | int == 14
|
||||
- not wazuh_sources_installation.enabled
|
||||
|
||||
- name: Debian/Ubuntu | Installing Wazuh repository key
|
||||
apt_key:
|
||||
url: "{{ wazuh_manager_config.repo.gpg }}"
|
||||
when:
|
||||
- not (ansible_distribution == "Ubuntu" and ansible_distribution_major_version | int == 14)
|
||||
- not wazuh_sources_installation.enabled
|
||||
|
||||
- name: Debian/Ubuntu | Add Wazuh repositories
|
||||
apt_repository:
|
||||
@ -37,6 +39,8 @@
|
||||
state: present
|
||||
update_cache: true
|
||||
changed_when: false
|
||||
when:
|
||||
- not wazuh_sources_installation.enabled
|
||||
|
||||
- name: Debian/Ubuntu | Installing NodeJS repository key (Ubuntu 14)
|
||||
become: true
|
||||
@ -126,3 +130,5 @@
|
||||
register: wazuh_manager_main_packages_installed
|
||||
until: wazuh_manager_main_packages_installed is succeeded
|
||||
tags: init
|
||||
when:
|
||||
- not wazuh_sources_installation.enabled
|
||||
|
||||
@ -41,6 +41,7 @@
|
||||
when:
|
||||
- (ansible_os_family|lower == 'redhat') and (ansible_distribution|lower != 'amazon')
|
||||
- (ansible_distribution_major_version|int <= 5)
|
||||
- not wazuh_sources_installation.enabled
|
||||
register: repo_v5_manager_installed
|
||||
|
||||
- name: RedHat/CentOS/Fedora | Install Wazuh repo
|
||||
@ -53,6 +54,7 @@
|
||||
changed_when: false
|
||||
when:
|
||||
- repo_v5_manager_installed is skipped
|
||||
- not wazuh_sources_installation.enabled
|
||||
|
||||
- name: RedHat/CentOS/Fedora | Install openscap
|
||||
package: name={{ item }} state=present
|
||||
@ -149,6 +151,7 @@
|
||||
until: wazuh_manager_main_packages_installed is succeeded
|
||||
when:
|
||||
- ansible_os_family|lower == "redhat"
|
||||
- not wazuh_sources_installation.enabled
|
||||
tags:
|
||||
- init
|
||||
|
||||
|
||||
@ -354,7 +354,11 @@
|
||||
- ansible_distribution in ['CentOS', 'RedHat', 'Amazon'] and ansible_distribution_major_version|int < 6
|
||||
|
||||
- include_tasks: "RMRedHat.yml"
|
||||
when: ansible_os_family == "RedHat" or ansible_os_family == "Amazon"
|
||||
when:
|
||||
- ansible_os_family == "RedHat" or ansible_os_family == "Amazon"
|
||||
- not wazuh_sources_installation.enabled
|
||||
|
||||
- include_tasks: "RMDebian.yml"
|
||||
when: ansible_os_family == "Debian"
|
||||
when:
|
||||
- ansible_os_family == "Debian"
|
||||
- not wazuh_sources_installation.enabled
|
||||
|
||||
Loading…
Reference in New Issue
Block a user