Fix conditionals related with Manager and API kind of installatioin

This commit is contained in:
Jose M 2019-11-26 14:55:57 +01:00
parent 94ed23c607
commit a25b7d9681
3 changed files with 5 additions and 10 deletions

View File

@ -10,8 +10,7 @@
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 - not wazuh_agent_sources_installation.enabled or not wazuh_api_sources_installation.enabled
- not wazuh_api_sources_installation.enabled
register: repo_v5_installed register: repo_v5_installed
- name: RedHat/CentOS/Fedora | Install Wazuh repo - name: RedHat/CentOS/Fedora | Install Wazuh repo

View File

@ -27,16 +27,14 @@
when: when:
- ansible_distribution == "Ubuntu" - ansible_distribution == "Ubuntu"
- ansible_distribution_major_version | int == 14 - ansible_distribution_major_version | int == 14
- not wazuh_manager_sources_installation.enabled - not wazuh_manager_sources_installation.enabled or not wazuh_api_sources_installation.enabled
- not wazuh_api_sources_installation.enabled
- name: Debian/Ubuntu | Installing Wazuh repository key - name: Debian/Ubuntu | Installing Wazuh repository key
apt_key: apt_key:
url: "{{ wazuh_manager_config.repo.gpg }}" url: "{{ wazuh_manager_config.repo.gpg }}"
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 - not wazuh_manager_sources_installation.enabled or not wazuh_api_sources_installation.enabled
- not wazuh_api_sources_installation.enabled
- name: Debian/Ubuntu | Add Wazuh repositories - name: Debian/Ubuntu | Add Wazuh repositories
apt_repository: apt_repository:
@ -46,8 +44,7 @@
update_cache: true update_cache: true
changed_when: false changed_when: false
when: when:
- not wazuh_manager_sources_installation.enabled - not wazuh_manager_sources_installation.enabled or not wazuh_api_sources_installation.enabled
- not wazuh_api_sources_installation.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:

View File

@ -10,8 +10,7 @@
when: when:
- (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 - not wazuh_manager_sources_installation.enabled or not wazuh_api_sources_installation.enabled
- not wazuh_api_sources_installation.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