Should I keep previous parameters if I would like to add other parameters during foreman-installer?

Question:
Hi all, I was confusing if I use foreman-installer as below contexts first time, and then run again foreman-installer with antoher contexts. What will be happened of foreman server?

Expected outcome:

  1. It will keep first time and apply second time context
  2. Second time will overwrite first time which means first time context will disappear.

Foreman and Proxy versions:
Foreman 3.2.1

Distribution and version:
Debian 11

Other relevant data:

First time

foreman-installer \
--enable-puppet \
--puppet-server true \
--enable-foreman-proxy \
--enable-foreman-proxy-plugin-discovery \
--enable-foreman-plugin-discovery \
--enable-foreman-plugin-puppet \
--enable-foreman-cli-puppet \
--foreman-proxy-plugin-discovery-install-images=true \
--foreman-proxy-puppet true \
--foreman-proxy-puppetca true \

Second time

foreman-installer \
--foreman-proxy-dns=true \
--foreman-proxy-dns-managed true \
--foreman-proxy-dns-interface=ens3 \
--foreman-proxy-dns-zone=test.com \
--foreman-proxy-dns-reverse=139.188.10.in-addr.arpa \
--foreman-proxy-dns-forwarders=8.8.8.8 \

Hi,

foreman-installer remembers everything you pass to it for future runs. What happens can be best explained as:

  • foreman-installer uses everything you pass to it for the current run
  • for things you have not passed in the current run, it looks up “remembered” values from the last run
  • for every parameter you never passed, default values are used

After the run, the config will be saved again for future runs.
You can look up the “remembered” value in /etc/foreman-installer/scenarios.d/<scenario>-answers.yml, where <scenario> should be foreman in your case. You can also look up the current state of every parameter using foreman-installer --full-help.

On a side note: You stated that you installed Foreman 3.2, which was release quite a long time ago and has been out of support for about a year now. If you are starting fresh, I would highly recommend starting with a current version (latest stable release is 3.7).

Regards

1 Like

Hi @areyus

Thanks for your reply immediately. I got it via your explaination.

Yes, your are right. I am just testing foreman-software recentlly. I will try a new fresh about Foreman 3.7. The reason why I start Foreman 3.2 for testing is beacuse tutorials is shortage for a beginner. So I follow this web Automated provisioning - The Foreman in 2022 for my first time trial and error.

So far, I have to say Foreman is fantastic, I will try its 3.7 version soon.

1 Like