Fix stdout_lines check
This patch checks the length of stdout rather than the length of stdout_lines to avoid errors when the output is empty. Change-Id: I1dd68d37ea4884d164727d697a879cf1a09c2c9a
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
rhel_07_010020_violations: "{{ rhel_07_010020_files.stdout_lines | default([]) | join(', ') }}"
|
||||
when:
|
||||
- rhel_07_010020_files is defined
|
||||
- rhel_07_010020_files.stdout_lines | length > 0
|
||||
- rhel_07_010020_files.stdout is defined
|
||||
tags:
|
||||
- high
|
||||
- RHEL-07-010020
|
||||
@@ -56,7 +56,7 @@
|
||||
when:
|
||||
- ansible_os_family | lower == 'debian'
|
||||
- rhel_07_010020_files is defined
|
||||
- rhel_07_010020_files.stdout_lines | length > 0
|
||||
- rhel_07_010020_files.stdout is defined
|
||||
tags:
|
||||
- high
|
||||
- RHEL-07-010020
|
||||
|
@@ -38,7 +38,7 @@
|
||||
- not check_mode | bool
|
||||
- ansible_os_family | lower == 'redhat'
|
||||
- rhel_07_010020_files is defined
|
||||
- rhel_07_010020_files.stdout_lines | length > 0
|
||||
- rhel_07_010020_files.stdout is defined
|
||||
tags:
|
||||
- high
|
||||
- RHEL-07-010020
|
||||
|
Reference in New Issue
Block a user