Wazuh manager: check openscap version.

This commit is contained in:
Miguelangel Freitas 2017-07-25 20:04:45 -04:00
parent 263ceebded
commit 972ffee9a9
2 changed files with 20 additions and 4 deletions

View File

@ -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

View File

@ -140,9 +140,11 @@
<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' %}