Skip to content

Commit

Permalink
Add proxy for subscription-manager (#8012) (#8039)
Browse files Browse the repository at this point in the history
If using proxy, it is necessary to configure it before running
"subscription-manager status" command.
This adds the step.
  • Loading branch information
oomichi authored Sep 30, 2021
1 parent 3b2b618 commit 9fafe98
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions roles/bootstrap-os/tasks/bootstrap-redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
become: true
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('^.*:') }}
become: true
when:
- not skip_http_proxy_on_os_packages
- http_proxy is defined

- name: Check RHEL subscription-manager status
command: /sbin/subscription-manager status
register: rh_subscription_status
Expand Down

0 comments on commit 9fafe98

Please sign in to comment.