Fix version check to not be a simple string compare

Signed-off-by: Adam Lewandowski <adam.lewandowski@plxis.com>
This commit is contained in:
Adam Lewandowski 2022-05-09 13:46:44 -04:00
parent e93d1ca735
commit d687cd8b44

View file

@ -54,7 +54,7 @@
- "system-auth"
- "password-auth"
when:
- ansible_distribution_version <= "8.1"
- ansible_distribution_version is version("8.1", "<=")
- rhel9cis_rule_5_5_2
- name: "5.5.2 | PATCH | Ensure system accounts are secured | RHEL8.2+ "
@ -66,7 +66,7 @@
- { regexp: '^\s*deny\s*=\s*[1-5]\b', line: 'deny = 5' }
- { regexp: '^\s*unlock_time\s*=\s*(0|9[0-9][0-9]|[1-9][0-9][0-9][0-9]+)\b', line: 'unlock_time = 900' }
when:
- ansible_distribution_version >= "8.2"
- ansible_distribution_version is version("8.2", ">=")
- rhel9cis_rule_5_5_2
- name: "5.5.3 | PATCH | Ensure password reuse is limited"