Unsuccessful installation of `foreman-installer`; error: Could not get default values

Problem:
Unsuccessful installation of foreman-installer; error: Could not get default values.

After fresh installation of CentOS 7 server, I ran the following commands:

rpm -ivh http://yum.theforeman.org/releases/1.22/el7/x86_64/foreman-release.rpm \
         http://yum.puppet.com/puppet6-release-el-7.noarch.rpm \
         http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install epel-release
yum -y upgrade
yum -y install openssh* puppetserver foreman-installer
foreman-installer

Does it has to do anything with the installation of openssh* and puppetserver? Or do I have to do some configuration to either foreman or puppetserver?

There are similar questions in this forum, however, none solved my problem:

Expected outcome:
Successfull installation of foreman-installer.

Foreman and Proxy versions:
foreman-installer: 1.22.0

Foreman and Proxy plugin versions:

Other relevant data:
forman-installer log: https://pastebin.com/xTNicuaE

I have reinstalled the CentOS 7.6.1810 Minimal server (no selections), and does as the Foreman Quickstart Guide says:

yum -y install https://yum.puppet.com/puppet6-release-el-7.noarch.rpm http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm https://yum.theforeman.org/releases/1.22/el7/x86_64/foreman-release.rpm
yum -y install foreman-installer
foreman-installer

Still I’ve got the same error: Could not get default values, check log file at /var/log/foreman-installer/foreman.log for more information

The new log is here.

We’ve seen this problem pop up a few times. The critical line is:

[ERROR 2019-07-24T17:51:32 main] e[1;33mWarning: Unknown variable: '::domain'. (file: /usr/share/foreman-installer/modules/foreman_proxy/manifests/params.pp, line: 268, column: 31)e[0m

Bug #27179: foreman-installer 1.22 fails on new Ubuntu Bionic box due to use of upcase() in foreman-proxy's params.pp - Installer - Foreman has more info, but in short the problem is that in various places we require a domain rather than just a short hostname. We should add a check for this.

Thank you, @ekohl, for your reply!

So, do I understand it correctly that if I set a domain, it would install it correctly? If so, what is the recommended way?

Okay, the solution is to create a fully qualified domain domain name (FQDN). I did it this way (src; also answered here):

  1. Change the server IP to a static one. I reserved the IP address in the router and left the server in DHCP mode; one might apply a static address on the server itself.

  2. Set a fully qualifed host name, like foreman.example.com using the hostnamectl set-hostname foreman.example.com command.

  3. Edit (append) the /etc/hosts file to redirect the host name of the server (step 2) to its IP (step 1); one can use this command: echo "192.168.1.50 foreman.example.com" > /etc/hosts (of course, change the IP and the hostname).

I got caught by this problem today, with a first-ever install of 2.0.0.1 on Ubuntu 18.04. Did I miss a patch?