Katello forklift cannot run foreman installer

Problem:
When running the local install of katello via forklift, e.g.
ansible-playbook -l localhost playbooks/katello.yml -e foreman_repositories_version=1.17 -e katello_repositories_version=3.6

on Oracle Linux 7.5, behind a Corp Internet proxy, the katello install playbook that runs the foreman install fails with a message saying that the http and https proxy environment variables need to be unset. However, because Corp proxy is needed in order to reach the Internet, without the environment variables set, all of the preceeding plays fail.

So I am in a catch-22. If I have the http/https proxy environment variables set, I can get to the foreman install section of the forklift install, but it fails and complains about the variables.

If I unset the variables, the preceding plays won’t work because they can’t reach the Internet.

Expected outcome:

The Katello forklift install works and Katello is installed and running.

Foreman and Proxy versions:
Foreman 1.17, Katello 3.6 via forklift

Foreman and Proxy plugin versions:
Latest

Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]

Oracle Linux 7.5 x86_64, kernel-3.10.0-862.3.2.el7.x86_64
Behind Internet proxy

Running forklift install with proxy vars set:

TASK [foreman_installer : Run installer] *****************************************************************************************************************************
Wednesday 06 June 2018 12:48:15 -0500 (0:00:00.048) 0:00:35.571 ********
fatal: [localhost]: FAILED! => {
“changed”: true,
“cmd”: “foreman-installer -v --scenario katello --disable-system-checks --foreman-admin-password changeme”,
“delta”: “0:00:06.302793”,
“end”: “2018-06-06 12:48:22.397376”,
“rc”: 20,
“start”: “2018-06-06 12:48:16.094583”
}

STDOUT:

Your system does not meet configuration criteria
[ INFO 2018-06-06 12:48:22 verbose] Executing hooks in group pre_migrations
[ INFO 2018-06-06 12:48:22 verbose] All hooks in group pre_migrations finished
[ INFO 2018-06-06 12:48:22 verbose] Executing hooks in group boot
[ INFO 2018-06-06 12:48:22 verbose] All hooks in group boot finished
[ INFO 2018-06-06 12:48:22 verbose] Executing hooks in group init
[ INFO 2018-06-06 12:48:22 verbose] All hooks in group init finished
[ INFO 2018-06-06 12:48:22 verbose] Loading default values from puppet modules…
[ INFO 2018-06-06 12:48:22 verbose] … finished
[ INFO 2018-06-06 12:48:22 verbose] Executing hooks in group pre_values
[ INFO 2018-06-06 12:48:22 verbose] All hooks in group pre_values finished
[ INFO 2018-06-06 12:48:22 verbose] Running installer with args [["-v", “–scenario”, “katello”, “–disable-system-checks”, “–foreman-admin-password”, “changeme”]]
[ INFO 2018-06-06 12:48:22 verbose] Installer finished in 2.117275259 seconds

STDERR:

Please unset the following environment variables before running the installer: http_proxy, https_proxy, ssl_cert_file

MSG:

non-zero return code

After running the install with the proxy vars unset, failure at:

TASK [epel_repositories : Setup Epel Repository] *********************************************************************************************************************
Wednesday 06 June 2018 12:46:35 -0500 (0:00:00.084) 0:00:03.414 ********
fatal: [localhost]: FAILED! => {
“changed”: false
}

MSG:

Failure downloading http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm, Request failed:

I think we have issues with http proxy set at the installer level. It interferes with some HTTP requests, for example registering itself. It’s been a very common source of installation issues. If you do need a proxy for internet access, you should set the proxy up for yum. IIRC that’s in /etc/yum.conf.

@ekohl ah good idea. I will try that and see if I can get it rolling.

OK I tried that and it doesn’t seem like Ansible is picking up the proxy. Is it possible that I’d need to add the proxy to Ansible’s yum module somehow? I don’t see an option for that though.