Skip to content

Commit

Permalink
fix: enable installing cri-tools rpm from upstream repo (#1191)
Browse files Browse the repository at this point in the history
  • Loading branch information
supershal authored Sep 27, 2024
1 parent eddd723 commit 4f29942
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ansible/roles/kubeadm/tasks/redhat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,22 @@


- block:
- name: check cri-tools rpm exists locally at '/opt'
stat:
path: "/opt/{{ 'cri-tools-' + critools_rpm }}{{ '-fips' if fips.enabled else '' }}.rpm"
delegate_to: localhost
register: haslocalcritools
become: false

- name: copy cri-tools rpm
copy:
src: "/opt/{{ 'cri-tools-' + critools_rpm }}{{ '-fips' if fips.enabled else '' }}.rpm"
dest: "/opt/{{ 'cri-tools-' + critools_rpm }}.rpm"
when: haslocalcritools.stat.exists

- name: install cri-tools rpm package
yum:
name: "/opt/{{ 'cri-tools-' + critools_rpm }}.rpm"
name: "{{ '/opt/' if haslocalcritools.stat.exists }}{{ 'cri-tools-' + critools_rpm }}{{'.rpm' if haslocalcritools.stat.exists }}"
state: present
update_cache: true
enablerepo: "{{ 'offline' if offline_mode_enabled else '' }}"
Expand Down

0 comments on commit 4f29942

Please sign in to comment.