The right way to determine the answers file location is to read the scenario file and use the value for :answer_file. However, the script now assumes it's always ${scenario}-answers.yaml which can lead to incorrect behavior.
Created from redmine issue https://projects.theforeman.org/issues/32743
Upstream bug assigned to ekohlvan
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/32743 has been resolved.
The reproducer is (on the original host), consider the active scenario file (/etc/foreman-installer/scenarios.d/satellite.yaml). That contains a key :answer_file which points (as the name indicates) to an answer file. Move the file and change the scenario file to match. This is pretty much step 1 and 4 of https://access.redhat.com/documentation/en-us/red_hat_satellite/6.9/html/installing_satellite_server_from_a_disconnected_network/installing-satellite-server-disconnected#configuring-satellite-automatically-using-an-answer-file_satellite but instead of copying, move the file. That guarantees it to fail. Having differing answers is also a valid way to verify, but harder to because you can easily miss thing. Note that that documentation caused the customer to have a problem. In 6.10 it should be gone from the docs, but technically it's still valid and we'll have upgrading users.
I changed the debug level of the foreman-proxy using the modified answer file on new location and then ran `satellite-installer --scenario satellite`. This in turn changed the debug level. I have no means to test this doesn't break when doing the satellite-change-hostname, but the satellite-change-hostname does call the installer which seem fine, so I consider this as VERIFIED.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: Satellite 6.10 Release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:4702