--- - name: RedHat/CentOS/Fedora | Install Wazuh repo yum_repository: name: wazuh_repo description: Wazuh repository baseurl: https://packages.wazuh.com/3.x/yum/ gpgkey: https://packages.wazuh.com/key/GPG-KEY-WAZUH gpgcheck: yes when: - ansible_distribution_major_version|int > 5 - name: RedHat/CentOS 5 | Install Wazuh repo yum_repository: name: wazuh_repo description: Wazuh repository baseurl: https://packages.wazuh.com/3.x/yum/5/ gpgkey: https://packages.wazuh.com/key/GPG-KEY-WAZUH-5 gpgcheck: yes when: - ansible_distribution_major_version|int == 5 - name: RedHat/CentOS/Fedora | download Oracle Java RPM get_url: url: http://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jre-8u171-linux-x64.rpm dest: /tmp/jre-8-linux-x64.rpm headers: 'Cookie:oraclelicense=accept-securebackup-cookie' register: oracle_java_task_rpm_download when: - wazuh_agent_config.cis_cat.disable == 'no' - wazuh_agent_config.cis_cat.install_java == 'yes' tags: - init - name: RedHat/CentOS/Fedora | Install Oracle Java RPM package: name=/tmp/jre-8-linux-x64.rpm state=present when: - wazuh_agent_config.cis_cat.disable == 'no' - wazuh_agent_config.cis_cat.install_java == 'yes' - oracle_java_task_rpm_download is defined tags: - init - 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/CentOS/RedHat | Install openscap package: name=openscap-scanner state=present when: wazuh_agent_config.openscap.disable == 'no' tags: - init