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
|
- name: Debian/Ubuntu | Install apt-transport-https and ca-certificates
|
||||||
apt:
|
apt:
|
||||||
name:
|
name:
|
||||||
@ -33,6 +38,8 @@
|
|||||||
repo: "{{ wazuh_agent_config.repo.apt }}"
|
repo: "{{ wazuh_agent_config.repo.apt }}"
|
||||||
state: present
|
state: present
|
||||||
update_cache: true
|
update_cache: true
|
||||||
|
when:
|
||||||
|
- wazuh_agent_config.repo.sources == "false"
|
||||||
|
|
||||||
- name: Debian/Ubuntu | Set Distribution CIS filename for debian
|
- name: Debian/Ubuntu | Set Distribution CIS filename for debian
|
||||||
set_fact:
|
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
|
- name: RedHat/CentOS 5 | Install Wazuh repo
|
||||||
yum_repository:
|
yum_repository:
|
||||||
name: wazuh_repo
|
name: wazuh_repo
|
||||||
@ -10,6 +15,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)
|
||||||
|
- wazuh_agent_config.repo.sources == "false"
|
||||||
register: repo_v5_installed
|
register: repo_v5_installed
|
||||||
|
|
||||||
- name: RedHat/CentOS/Fedora | Install Wazuh repo
|
- name: RedHat/CentOS/Fedora | Install Wazuh repo
|
||||||
@ -22,6 +28,7 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
- repo_v5_installed is skipped
|
- repo_v5_installed is skipped
|
||||||
|
- wazuh_agent_config.repo.sources == "false"
|
||||||
|
|
||||||
- name: RedHat/CentOS/Fedora | download Oracle Java RPM
|
- name: RedHat/CentOS/Fedora | download Oracle Java RPM
|
||||||
get_url:
|
get_url:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user