Wazuh manager: check openscap version.
This commit is contained in:
parent
263ceebded
commit
972ffee9a9
@ -34,3 +34,17 @@
|
||||
- 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
|
||||
|
||||
@ -140,9 +140,11 @@
|
||||
<profile>xccdf_org.ssgproject.content_profile_common</profile>
|
||||
</content>
|
||||
{% elif ansible_distribution == 'Debian' and ansible_distribution_release == 'jessie' %}
|
||||
{% if openscap_version_valid.stdout == "0" %}
|
||||
<content type="xccdf" path="ssg-debian-8-ds.xml">
|
||||
<profile>xccdf_org.ssgproject.content_profile_common</profile>
|
||||
</content>
|
||||
{% endif %}
|
||||
<content type="oval" path="cve-debian-oval.xml"/>
|
||||
{% elif ansible_distribution == 'CentOS' %}
|
||||
{% if ansible_distribution_major_version == '7' %}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user