Skip to content

Trigger subscription-manager refresh command after registration #3067

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions roles/adoption_osp_deploy/tasks/login_registries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,19 @@
register: _rh_result
until: not _rh_result.failed

- name: Pull latest subscription data
become: true
no_log: true
ansible.builtin.command: subscription-manager refresh
retries: 5
delay: 30
register: _rh_refresh
until: _rh_refresh is success

- name: Get current /etc/redhat-release
ansible.builtin.command: cat /etc/redhat-release
register: _current_rh_release

- name: Print current /etc/redhat-release
ansible.builtin.debug:
msg: "{{ _current_rh_release.stdout }}"

- name: Login in container registry
when:
- cifmw_adoption_osp_deploy_container_user is defined
Expand Down
Loading