Fix regex for replacing http_proxy (#8957)

This commit is contained in:
Dickson Tung 2022-06-14 22:07:34 +08:00 committed by GitHub
parent 3ae397019c
commit e5d6c042a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,7 @@
when: not skip_http_proxy_on_os_packages when: not skip_http_proxy_on_os_packages
- name: Add proxy to RHEL subscription-manager if http_proxy is defined - 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+$') }} --server.proxy_port={{ http_proxy | regex_replace('^.*:') }}
become: true become: true
when: when:
- not skip_http_proxy_on_os_packages - not skip_http_proxy_on_os_packages