Add conditionals to disable repo installation and install from sources
This commit is contained in:
parent
2b4a1407a5
commit
8e56076b9f
@ -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:
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user