Httpboot without foreman-answers.yaml or how to generate foreman-answers.yaml from current setup?

Problem:
The intention is to enable httpboot feature but unfortunately due to past mistakes our foreman-answers.yaml file is hopelesly out of date.

Procedure used: https://docs.theforeman.org/nightly/Provisioning_Guide/index-foreman-el.html#Creating_Hosts_with_UEFI_HTTP_Boot_Provisioning_provisioning

Case 1: Installing with outdated foreman-answers.yaml scenario leads to Broken DB, AD integration lost, all proxies are disconnected etc.
Case 2: Installing with “–dont-save-answers” leads to broken DNS/DHCP features on the smart proxy and potentially other changes are made to current setup.

Expected outcome:
Wondering how could we generate a new foreman-answers.yaml file from the current setup. Currently we need to enable httpboot without breaking the instance.

Foreman and Proxy versions:
2.5.3

Distribution and version:
Debian 10 Buster

Other relevant data:

Thank you,
Sasha

The short answer (and you won’t like it) is: you can’t. If we could generate the answers from the systems, we wouldn’t need to store them :wink:

But maybe you could (for now) get away with just doing everything manually? From your description I gather you essentially want to do foreman-installer --foreman-proxy-httpboot true, correct?

If I am not totally mistaken, the only real thing this parameter does is to edit /etc/foreman-proxy/settings.d/httpboot.yml to read:

:enabled: true

:root_dir: /var/lib/tftpboot

And then to restart the foreman-proxy service. You can try doing this yourself and see if that helps for you current issue?

Long term you’ll still need a working answers file, but at least you can get HTTPBoot working?

Thanks a lot Evgeni! It worked for us, but there is the answers file correction ahead that scares the hell out of me :smile:

Hi Evgeni, unfortunately that was not enough, we also need to enable http/s support

--foreman-proxy-http true 

What would be the corresponding settings in files?

currently I am getting an exception:
[Foreman::Exception]: HTTP UEFI boot requires proxy with httpboot feature

Thanks

For that you’d need :http_port: 8000 (or some other port) in /etc/foreman-proxy/settings.yml