43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
---
|
|
- name: Debian/Ubuntu | Install apt-transport-https and ca-certificates
|
|
apt: name="{{ item }}" state=present update_cache=yes
|
|
with_items:
|
|
- apt-transport-https
|
|
- ca-certificates
|
|
|
|
- name: Debian/Ubuntu | Installing repository key
|
|
apt_key: url=https://packages.wazuh.com/key/GPG-KEY-WAZUH
|
|
|
|
- name: Debian/Ubuntu | Add Wazuh repositories
|
|
apt_repository:
|
|
repo: deb https://packages.wazuh.com/apt {{ ansible_distribution_release }} main
|
|
state: present
|
|
update_cache: yes
|
|
|
|
- name: Debian/Ubuntu | Set Distribution CIS filename for debian
|
|
set_fact:
|
|
cis_distribution_filename: cis_debian_linux_rcl.txt
|
|
when: ansible_os_family == "Debian"
|
|
|
|
- name: Debian/Ubuntu | Install OpenScap
|
|
package: name={{ item }} state=present
|
|
with_items:
|
|
- libopenscap8
|
|
- xsltproc
|
|
tags:
|
|
- init
|
|
|
|
- name: Debian/Ubuntu | Get OpenScap installed version
|
|
shell: "dpkg-query --showformat='${Version}' --show libopenscap8"
|
|
register: openscap_version
|
|
changed_when: true
|
|
tags:
|
|
- config
|
|
|
|
- name: Debian/Ubuntu | Check OpenScap version
|
|
shell: "dpkg --compare-versions '{{ openscap_version.stdout }}' '>=' '1.2'; echo $?"
|
|
register: openscap_version_valid
|
|
changed_when: true
|
|
tags:
|
|
- config
|