Describe the Issue
The conditional check for the RHEL-07-020110 task for ansible.builtin.service (line number 1353 in tasks/fix-cat2.yml) does not reference the registered variable rhel_07_020110_autofs_service_status.stdout. The variable is referenced directly, and thus will not equal the string "loaded"
Expected Behavior
rhel_07_020110_autofs_service_status.stdout is referenced by the task, and the string "loaded" is properly matched or not.
Actual Behavior
rhel_07_020110_autofs_service_status is referenced without checking .stdout sub item in the returned dictionary, and thus the string comparison for "loaded" will never match.
Control(s) Affected
RHEL-07-020110
Environment (please complete the following information):
Ansible Version: >= 2.9
Host Python Version: >= 2.7 or 3.8
Ansible Server Python Version: 3.8
Additional Details:
Additional Notes
Possible Solution
Ammend line 1353 as follows:
remove: rhel_07_020110_autofs_service_status == "loaded"
add: rhel_07_020110_autofs_service_status.stdout == "loaded"
I will also submit a pull request to amend as described above.
Describe the Issue The conditional check for the RHEL-07-020110 task for ansible.builtin.service (line number 1353 in tasks/fix-cat2.yml) does not reference the registered variable rhel_07_020110_autofs_service_status.stdout. The variable is referenced directly, and thus will not equal the string "loaded"
Expected Behavior rhel_07_020110_autofs_service_status.stdout is referenced by the task, and the string "loaded" is properly matched or not.
Actual Behavior rhel_07_020110_autofs_service_status is referenced without checking .stdout sub item in the returned dictionary, and thus the string comparison for "loaded" will never match.
Control(s) Affected RHEL-07-020110
Environment (please complete the following information):
Additional Notes
Possible Solution Ammend line 1353 as follows: remove:
rhel_07_020110_autofs_service_status == "loaded"
add:rhel_07_020110_autofs_service_status.stdout == "loaded"
I will also submit a pull request to amend as described above.