Getting a formated list of modified foreman-installer CLI options


I am currently in the process of migrating an old foreman instance (2.1.4) to a fresh 3.4 installation provisioned via ansible and the theforeman.operator ansible collection.

During planning it was decided to skip upgrading the instance throughout all versions and instead try to import existing settings into a new instance.

Since the 2.4.1 installation was installed manually, I was wondering wether it was possible to just export all the foreman-installer CLI options that were user defined. I.e. I am trying to get an export with all the config options that are configurable via the installer and are not set to a default value. At least getting a list of the changed options should be possible, as the installer is clearly aware of them. I just don’t know how.

Expected outcome:

Some command line option that gives me a list of foreman-installer CLI options that were user set and their current value so I can reuse them.

Foreman and Proxy versions:
Foreman 2.4.1 (same for controller / smart proxy)

Foreman and Proxy plugin versions:
n/a see above

Distribution and version:
CentOS 7.9.2009

I don’t think there is a solution for what you are looking for explicitly.
The options you have are (at least the ones I am aware of) :

  • foreman-installer --full-help should give you a list of all installer options with the currently active value. Usually there is also a “reset” option for each setting, and on those the default values are listed. At least that is the implementation in more recent versions, I cant remember if this has been the case in 2.4 already. Maybe you can parse that output via some script to get what you are looking for
  • The installer options are stored in /etc/foreman-installer/scenarios.d/-answers.yaml. If you can somehow get a “clean” copy of that file (no changes made to options) for your version, that might also help in figuring out what has changed.

I hope this helps, I am not aware of any other method to achieve what you are looking for.