Skip to content
13 changes: 8 additions & 5 deletions robottelo/hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -920,12 +920,12 @@ def enable_ipv6_podman_proxy(self):
container_cfg = '/etc/containers/containers.conf'
proxy_url = settings.http_proxy.http_proxy_ipv6_url
if self.execute(f'grep -q "https_proxy" {container_cfg}').status != 0:
assert (
self.execute(
f'echo -e "[engine]\\nenv = [\'https_proxy={proxy_url}\']" >> {container_cfg}'
).status
== 0
proxy_env = (
'[engine]\\nenv = ['
f'\\"https_proxy={proxy_url}\\"]\\n'
'[containers]\\nhttp_proxy=false'
)
assert self.execute(f'echo -e "{proxy_env}" >> {container_cfg}').status == 0

def disable_rhsm_proxy(self):
"""Disables HTTP proxy for subscription manager"""
Expand Down Expand Up @@ -2138,6 +2138,8 @@ def install_satellite_foremanctl(
# Add IPv6 proxy for IPv6 communication
self.enable_ipv6_dnf_and_rhsm_proxy()
self.enable_ipv6_system_proxy()
# Add IPv6 proxy for podman to pull from registry & install podman if not pre-installed
self.ensure_podman_installed(enable_ipv6_proxy=True)
# Enable RHEL and Satellite repos
self.register_to_cdn()
self.setup_rhel_repos()
Expand All @@ -2150,6 +2152,7 @@ def install_satellite_foremanctl(
job_template='upstream-pr-install',
target_vm=self.name,
pull_requests=pull_requests,
deploy_network_type=settings.server.network_type,
).execute()

# Install podman (required for foremanctl container operations)
Expand Down
3 changes: 1 addition & 2 deletions tests/foreman/installer/test_install_foremanctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,8 @@ def test_foremanctl_deploy_certificate_cname(module_sat_ready_rhel):
assert result.status == 0, (
f'foremanctl deploy with --certificate-cname failed:\n{result.stderr}'
)

result = satellite.execute(
'curl --fail --silent --show-error --head '
'curl --noproxy "*" --fail --silent --show-error --head '
f'--cacert {FOREMANCTL_CERTS_DIR}/ca.crt '
f'--resolve "{cname}:443:127.0.0.1" '
f'https://{cname}/users/login'
Expand Down