Certificate verify failed (self signed certificate) when run foreman-installer

Problem:
Hi, I’m new to Foreman and trying to install Foreman 3.11 on Ubuntu 20.04 using foreman-installer. However, I keep encountering an SSL certificate verification error (self-signed certificate) that is preventing the installation from proceeding correctly.

Here are the relevant error logs:

2024-09-11 16:22:41 [ERROR ] [configure] /Stage[main]/Foreman::Register/Foreman_host[foreman-foreman.example.com]: Could not evaluate: Exception SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate) in get request to: https://foreman.example.com/api/v2/hosts?search=name%3D%22foreman.example.com%22
2024-09-11 16:22:41 [ERROR ] [configure] Wrapped exception:
2024-09-11 16:22:41 [ERROR ] [configure] SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate)
2024-09-11 16:22:41 [ERROR ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[foreman.example.com]: Could not evaluate: Exception SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate) in get request to: https://foreman.example.com/api/v2/smart_proxies?search=name%3D%22foreman.example.com%22
2024-09-11 16:22:41 [ERROR ] [configure] Wrapped exception:
2024-09-11 16:22:41 [ERROR ] [configure] SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate)
2024-09-11 16:22:41 [ERROR ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_host[foreman-proxy-foreman.example.com]: Could not evaluate: Exception SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate) in get request to: https://foreman.example.com/api/v2/hosts?search=name%3D%22foreman.example.com%22
2024-09-11 16:22:41 [ERROR ] [configure] Wrapped exception:
2024-09-11 16:22:41 [ERROR ] [configure] SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate)

I’m unsure how to resolve this SSL issue and would appreciate any guidance. Apologies if this is a basic question, but I’m new to working with Foreman and certificates.

Expected outcome:
The Foreman installation should complete without SSL verification errors, allowing hosts and smart proxies to register properly.

Foreman and Proxy versions:

Foreman 3.11

Distribution and version:

Ubuntu 20.04

This seems to be similar to problem discussed here: