Skip to content

Commit

Permalink
Fix key in old versions
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Dec 11, 2024
1 parent e96a357 commit c993e52
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tasks/Debian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@
set_fact:
kube_minor_version: "{{ kube_version.split('.')[0] }}.{{ kube_version.split('.')[1] }}"

# for some reason, the key for 1.27 or lower is does not work
- name: Set kube_key_version
set_fact:
kube_key_version: "1.30"
when: "kube_version is version('1.27', '<')"

- name: Add repo key
get_url:
url: "https://pkgs.k8s.io/core:/stable:/v{{ kube_minor_version }}/deb/Release.key"
url: "https://pkgs.k8s.io/core:/stable:/v{{ kube_key_version }}/deb/Release.key"
dest: /etc/apt/trusted.gpg.d/kubernetes.asc
mode: '0644'

Expand Down

0 comments on commit c993e52

Please sign in to comment.