update ansible_distribution_major_version conditionals

Signed-off-by: Karsten Hopp <karsten@redhat.com>
This commit is contained in:
Karsten Hopp 2019-09-02 12:14:18 +02:00 committed by Pierre-Yves Chibon
parent d982c06fde
commit c9ed62ac32
45 changed files with 460 additions and 175 deletions

View file

@ -1,13 +1,4 @@
---
- name: install rkhunter (yum)
package: name=rkhunter state=present
notify:
- run rkhunter
tags:
- rkhunter
- packages
when: ansible_distribution_major_version|int < 22
- name: install rkhunter (dnf)
package: name=rkhunter state=present
notify:
@ -15,7 +6,7 @@
tags:
- rkhunter
- packages
when: ansible_distribution_major_version|int > 21 and ansible_cmdline.ostree is not defined
when: ansible_distribution_major_version|int >= 29 and ansible_distribution is 'Fedora' and ansible_cmdline.ostree is not defined
- name: rkhunter.conf

View file

@ -165,13 +165,8 @@ ALLOW_SSH_ROOT_USER=without-password
# configuration file, then a value of '2' may be set here in order to
# suppress a warning message. This option has a default value of '0'.
#
{% if ansible_distribution == 'Fedora' and ansible_distribution_major_version|int < 22 %}
# Fedora 21 doesn't set protocol in ssh config
ALLOW_SSH_PROT_V1=2
{% else %}
# For RHEL and Fedora 22+ we set proto to v2 only
ALLOW_SSH_PROT_V1=0
{% endif %}
#
# This setting tells rkhunter the directory containing the SSH configuration