85 lines
2.4 KiB
YAML
85 lines
2.4 KiB
YAML
---
|
|
- name: Debian/Ubuntu | Install apt-transport-https and ca-certificates
|
|
apt:
|
|
name: "{{ item }}"
|
|
state: present
|
|
cache_valid_time: 3600
|
|
with_items:
|
|
- apt-transport-https
|
|
- ca-certificates
|
|
|
|
- name: Debian/Ubuntu | Installing Wazuh repository key
|
|
apt_key: url=https://s3-us-west-1.amazonaws.com/packages-dev.wazuh.com/key/GPG-KEY-WAZUH
|
|
|
|
- name: Debian/Ubuntu | Add Wazuh repositories
|
|
apt_repository:
|
|
repo: 'deb https://s3-us-west-1.amazonaws.com/packages-dev.wazuh.com/pre-release/apt/ unstable main'
|
|
state: present
|
|
update_cache: yes
|
|
|
|
- name: Debian/Ubuntu | Installing NodeJS repository key
|
|
apt_key: url=https://deb.nodesource.com/gpgkey/nodesource.gpg.key
|
|
|
|
- name: Debian/Ubuntu | Add NodeSource repositories for Node.js
|
|
apt_repository:
|
|
repo: "deb https://deb.nodesource.com/node_6.x {{ ansible_distribution_release }} main"
|
|
state: present
|
|
update_cache: yes
|
|
|
|
- name: Debian/Ubuntu | Set Distribution CIS filename for Debian/Ubuntu
|
|
set_fact:
|
|
cis_distribution_filename: cis_debian_linux_rcl.txt
|
|
|
|
- when:
|
|
- wazuh_manager_config.cis_cat.disable == 'no'
|
|
- wazuh_manager_config.cis_cat.install_java == 'yes'
|
|
block:
|
|
- name: Debian/Ubuntu | Setting webupd8 repository
|
|
apt_repository:
|
|
repo: 'ppa:webupd8team/java'
|
|
codename: 'xenial'
|
|
update_cache: yes
|
|
|
|
- name: Debian/Ubuntu | Accept Oracle Java 8 license
|
|
debconf:
|
|
name: oracle-java8-installer
|
|
question: shared/accepted-oracle-license-v1-1
|
|
value: true
|
|
vtype: boolean
|
|
|
|
- name: Debian/Ubuntu | Oracle Java 8 installer
|
|
apt:
|
|
name: oracle-java8-installer
|
|
state: present
|
|
cache_valid_time: 3600
|
|
tags:
|
|
- init
|
|
|
|
- name: Debian/Ubuntu | Install OpenScap
|
|
package:
|
|
name: "{{ item }}"
|
|
state: present
|
|
cache_valid_time: 3600
|
|
when: wazuh_manager_config.openscap.disable == 'no'
|
|
with_items:
|
|
- libopenscap8
|
|
- xsltproc
|
|
tags:
|
|
- init
|
|
|
|
- name: Debian/Ubuntu | Get OpenScap installed version
|
|
shell: "dpkg-query --showformat='${Version}' --show libopenscap8"
|
|
when: wazuh_manager_config.openscap.disable == 'no'
|
|
register: openscap_version
|
|
changed_when: true
|
|
tags:
|
|
- config
|
|
|
|
- name: Debian/Ubuntu | Check OpenScap version
|
|
shell: "dpkg --compare-versions '{{ openscap_version.stdout }}' '>=' '1.2'; echo $?"
|
|
when: wazuh_manager_config.openscap.disable == 'no'
|
|
register: openscap_version_valid
|
|
changed_when: true
|
|
tags:
|
|
- config
|