You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if ansible-playbook fails, the only reported result is simply
ERROR / (CalledProcessError: Command '['ansible-playbook', '-v', '-i', '192.168.121.21,', '--private-key', '/var/lib/libvirt/images/contest.sshkey', PosixPath('/usr/share/scap-security-guide/ansible/rhel9-playbook-stig_gui.yml')]' returned non-zero exit status 2.)
however we could be more verbose by parsing the output line-by-line (while printing it on stdout) and watching for something like ^fatal (instead of ^ok), so we can catch and re-report this:
fatal: [192.168.121.21]: FAILED! => {"changed": true, "cmd": ["usbguard", "generate-policy"], "delta": "0:00:00.001775", "end": "2023-06-26 15:15:50.050348", "msg": "non-zero return code", "rc": 127, "start": "2023-06-26 15:15:50.048573", "stderr": "usbguard: error while loading shared libraries: libusbguard.so.1: cannot open shared object file: Operation not permitted", "stderr_lines": ["usbguard: error while loading shared libraries: libusbguard.so.1: cannot open shared object file: Operation not permitted"], "stdout": "", "stdout_lines": []}
perhaps as a Note (?).
It wouldn't be waive-able, because this is the initial remediation (and not a scan), but at least it would give us more details upfront without having to dive into the fulltext log.
The text was updated successfully, but these errors were encountered:
Currently, if
ansible-playbook
fails, the only reported result is simplyERROR / (CalledProcessError: Command '['ansible-playbook', '-v', '-i', '192.168.121.21,', '--private-key', '/var/lib/libvirt/images/contest.sshkey', PosixPath('/usr/share/scap-security-guide/ansible/rhel9-playbook-stig_gui.yml')]' returned non-zero exit status 2.)
however we could be more verbose by parsing the output line-by-line (while printing it on stdout) and watching for something like
^fatal
(instead of^ok
), so we can catch and re-report this:fatal: [192.168.121.21]: FAILED! => {"changed": true, "cmd": ["usbguard", "generate-policy"], "delta": "0:00:00.001775", "end": "2023-06-26 15:15:50.050348", "msg": "non-zero return code", "rc": 127, "start": "2023-06-26 15:15:50.048573", "stderr": "usbguard: error while loading shared libraries: libusbguard.so.1: cannot open shared object file: Operation not permitted", "stderr_lines": ["usbguard: error while loading shared libraries: libusbguard.so.1: cannot open shared object file: Operation not permitted"], "stdout": "", "stdout_lines": []}
perhaps as a Note (?).
It wouldn't be waive-able, because this is the initial remediation (and not a scan), but at least it would give us more details upfront without having to dive into the fulltext log.
The text was updated successfully, but these errors were encountered: