Add conditionals to disable repo installation and install from sources

This commit is contained in:
Jose M 2019-11-14 19:11:59 +01:00
parent 2b4a1407a5
commit 8e56076b9f
2 changed files with 14 additions and 0 deletions

View File

@ -1,4 +1,9 @@
---
- include_tasks: "installation_from_sources"
when:
- wazuh_agent_config.repo.sources == "true"
- name: Debian/Ubuntu | Install apt-transport-https and ca-certificates
apt:
name:
@ -33,6 +38,8 @@
repo: "{{ wazuh_agent_config.repo.apt }}"
state: present
update_cache: true
when:
- wazuh_agent_config.repo.sources == "false"
- name: Debian/Ubuntu | Set Distribution CIS filename for debian
set_fact:

View File

@ -1,4 +1,9 @@
---
- include_tasks: "installation_from_sources"
when:
- wazuh_agent_config.repo.sources == "true"
- name: RedHat/CentOS 5 | Install Wazuh repo
yum_repository:
name: wazuh_repo
@ -10,6 +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"
register: repo_v5_installed
- name: RedHat/CentOS/Fedora | Install Wazuh repo
@ -22,6 +28,7 @@
changed_when: false
when:
- repo_v5_installed is skipped
- wazuh_agent_config.repo.sources == "false"
- name: RedHat/CentOS/Fedora | download Oracle Java RPM
get_url: