From e50f112de9921573c8917facdc3bb2bcf7c5fbb6 Mon Sep 17 00:00:00 2001 From: Takuya Murakami Date: Mon, 19 Jun 2023 18:24:21 +0900 Subject: [PATCH] fix parsing of RHSM proxy configuration (#10060) (#10228) Remove URL scheme part from http_proxy for server.proxy_hostname --- roles/bootstrap-os/tasks/bootstrap-redhat.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/bootstrap-os/tasks/bootstrap-redhat.yml b/roles/bootstrap-os/tasks/bootstrap-redhat.yml index ff9d0f781b2..c9e53525b39 100644 --- a/roles/bootstrap-os/tasks/bootstrap-redhat.yml +++ b/roles/bootstrap-os/tasks/bootstrap-redhat.yml @@ -17,7 +17,7 @@ when: not skip_http_proxy_on_os_packages - name: Add proxy to RHEL subscription-manager if http_proxy is defined - command: /sbin/subscription-manager config --server.proxy_hostname={{ http_proxy | regex_replace(':\d+$') }} --server.proxy_port={{ http_proxy | regex_replace('^.*:') }} + command: /sbin/subscription-manager config --server.proxy_hostname={{ http_proxy | regex_replace(':\d+$') | regex_replace('^.*://') }} --server.proxy_port={{ http_proxy | regex_replace('^.*:') }} become: true when: - not skip_http_proxy_on_os_packages