Running Foreman/Katello 3.12/4.14 and noticed what for a new host, “Content source” is set by default to the proxy used when the host was registered.
However the default value of “OpenSCAP Proxy” remains unset. So when running a SCAP scan on a host, I see this error:
Uploading results to https::9090/compliance/arf/59
Upload failed: Failed to open TCP connection to :9090 (Cannot assign requested address - connect(2) for nil port 9090)
If I manually set the “OpenSCAP Proxy” to the “Content source” proxy, rerun the scap ansible role, rerun the OpenSCAP scan, it work and the report is uploaded sucessfully.
Uploading results to https://fmproxy.internal:9090/compliance/arf/59
Report uploaded, report id: 9115
One workaround is to create host groups for each proxy and set the correct “OpenSCAP Proxy” value in each host group. This however is not really optimal since I do not want the host groups to not be tied to a specific proxy.
I would much rather the “OpenSCAP Proxy” is set to the Content source, if it is not set in the host group.
So I guess the question is:
- Is it possible to automatically set the “OpenSCAP Proxy” value to “Content source” when I register a new host without using host groups?
- If not, is it possible to implement a change so it is possible to set a default value for the “OpenSCAP Proxy” to “Content source”?