Wazuh manager: check openscap version.
This commit is contained in:
parent
263ceebded
commit
972ffee9a9
@ -34,3 +34,17 @@
|
|||||||
- xsltproc
|
- xsltproc
|
||||||
tags:
|
tags:
|
||||||
- init
|
- 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
|
||||||
|
|||||||
@ -125,9 +125,9 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<!-- Files no diff -->
|
<!-- Files no diff -->
|
||||||
{% for no_diff in wazuh_manager_config.syscheck.no_diff %}
|
{% for no_diff in wazuh_manager_config.syscheck.no_diff %}
|
||||||
<nodiff>{{ no_diff }}</nodiff>
|
<nodiff>{{ no_diff }}</nodiff>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</syscheck>
|
</syscheck>
|
||||||
|
|
||||||
<wodle name="open-scap">
|
<wodle name="open-scap">
|
||||||
@ -135,14 +135,16 @@
|
|||||||
<timeout>{{ wazuh_manager_config.openscap.timeout }}</timeout>
|
<timeout>{{ wazuh_manager_config.openscap.timeout }}</timeout>
|
||||||
<interval>{{ wazuh_manager_config.openscap.interval }}</interval>
|
<interval>{{ wazuh_manager_config.openscap.interval }}</interval>
|
||||||
<scan-on-start>{{ wazuh_manager_config.openscap.scan_on_start }}</scan-on-start>
|
<scan-on-start>{{ wazuh_manager_config.openscap.scan_on_start }}</scan-on-start>
|
||||||
{% if ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'xenial' %}
|
{% if ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'xenial' %}
|
||||||
<content type="xccdf" path="ssg-ubuntu-1604-ds.xml">
|
<content type="xccdf" path="ssg-ubuntu-1604-ds.xml">
|
||||||
<profile>xccdf_org.ssgproject.content_profile_common</profile>
|
<profile>xccdf_org.ssgproject.content_profile_common</profile>
|
||||||
</content>
|
</content>
|
||||||
{% elif ansible_distribution == 'Debian' and ansible_distribution_release == 'jessie' %}
|
{% elif ansible_distribution == 'Debian' and ansible_distribution_release == 'jessie' %}
|
||||||
|
{% if openscap_version_valid.stdout == "0" %}
|
||||||
<content type="xccdf" path="ssg-debian-8-ds.xml">
|
<content type="xccdf" path="ssg-debian-8-ds.xml">
|
||||||
<profile>xccdf_org.ssgproject.content_profile_common</profile>
|
<profile>xccdf_org.ssgproject.content_profile_common</profile>
|
||||||
</content>
|
</content>
|
||||||
|
{% endif %}
|
||||||
<content type="oval" path="cve-debian-oval.xml"/>
|
<content type="oval" path="cve-debian-oval.xml"/>
|
||||||
{% elif ansible_distribution == 'CentOS' %}
|
{% elif ansible_distribution == 'CentOS' %}
|
||||||
{% if ansible_distribution_major_version == '7' %}
|
{% if ansible_distribution_major_version == '7' %}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user