TASK [set_fact] *********************************************************************************************
fatal: [localhost]: FAILED! => {“msg”: “The conditional check ‘service_status.stdout_lines[0] == ‘enabled’’ failed. The error was: error while evaluating conditional (service_status.stdout_lines[0] == ‘enabled’): ‘dict object’ has no attribute ‘stdout_lines’\n\nThe error appears to be in ‘/home/thuan/Desktop/STIG/57898.yml’: line 44, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - set_fact:\n ^ here\n”}
TASK [Install log service package.] *************************************************************************
ok: [localhost]
TASK [Ensure log service is enabled and running.] ***********************************************************
changed: [localhost]
Try to write the full value of “service_status” right after being used to register the command with this:
debug
msg: “{{ service_status }}”
to detect what is missing. That dictionary should include stdout, stderr and stdout_lines keys if command “systemctl is-enabled rsyslog” was executed with no errors.