40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
---
|
|
# Tasks specific for RedHat systems
|
|
|
|
- name: RedHat | Set some facts
|
|
set_fact:
|
|
ansible_distribution: centos
|
|
when: ansible_distribution == "RedHat"
|
|
|
|
- name: RedHat | Install Wazuh repo
|
|
yum_repository:
|
|
name: wazuh_repo
|
|
description: CentOS-$releasever - Wazuh
|
|
baseurl: https://packages.wazuh.com/yum/el/$releasever/$basearch
|
|
gpgkey: https://packages.wazuh.com/key/GPG-KEY-WAZUH
|
|
gpgcheck: yes
|
|
|
|
|
|
- name: Set Distribution CIS filename for RHEL5
|
|
set_fact:
|
|
cis_distribution_filename: cis_rhel5_linux_rcl.txt
|
|
when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "5"
|
|
|
|
- name: Set Distribution CIS filename for RHEL6
|
|
set_fact:
|
|
cis_distribution_filename: cis_rhel6_linux_rcl.txt
|
|
when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "6"
|
|
|
|
- name: Set Distribution CIS filename for RHEL7
|
|
set_fact:
|
|
cis_distribution_filename: cis_rhel7_linux_rcl.txt
|
|
when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "7"
|
|
|
|
- name: RedHat | Install Wazuh Agent
|
|
yum: pkg={{ item }}
|
|
state=present
|
|
with_items:
|
|
- wazuh-agent
|
|
tags:
|
|
- init
|