PR #150 follow-up: Update yum repos to new format as well.

This commit is contained in:
Jeff Geerling 2024-03-05 22:08:09 -06:00
parent 928c143c93
commit 2bd76783dd
2 changed files with 3 additions and 6 deletions

View File

@ -56,10 +56,8 @@ kubernetes_apt_keyring_file: "/etc/apt/keyrings/kubernetes-apt-keyring.asc"
kubernetes_apt_repository: "deb [signed-by={{ kubernetes_apt_keyring_file }}] https://pkgs.k8s.io/core:/{{ kubernetes_apt_release_channel }}:/v{{ kubernetes_version }}/deb/ /" kubernetes_apt_repository: "deb [signed-by={{ kubernetes_apt_keyring_file }}] https://pkgs.k8s.io/core:/{{ kubernetes_apt_release_channel }}:/v{{ kubernetes_version }}/deb/ /"
kubernetes_yum_arch: '$basearch' kubernetes_yum_arch: '$basearch'
kubernetes_yum_base_url: "https://packages.cloud.google.com/yum/repos/kubernetes-el7-{{ kubernetes_yum_arch }}" kubernetes_yum_base_url: "https://pkgs.k8s.io/core:/stable:/v{{ kubernetes_version }}/rpm/"
kubernetes_yum_gpg_key: kubernetes_yum_gpg_key: "https://pkgs.k8s.io/core:/stable:/v{{ kubernetes_version }}/rpm/repodata/repomd.xml.key"
- https://packages.cloud.google.com/yum/doc/yum-key.gpg
- https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
kubernetes_yum_gpg_check: true kubernetes_yum_gpg_check: true
kubernetes_yum_repo_gpg_check: true kubernetes_yum_repo_gpg_check: true

View File

@ -11,10 +11,9 @@
- name: Add Kubernetes GPG keys. - name: Add Kubernetes GPG keys.
rpm_key: rpm_key:
key: "{{ item }}" key: "{{ kubernetes_yum_gpg_key }}"
state: present state: present
register: kubernetes_rpm_key register: kubernetes_rpm_key
with_items: "{{ kubernetes_yum_gpg_key }}"
- name: Make cache if Kubernetes GPG key changed. - name: Make cache if Kubernetes GPG key changed.
command: "yum -q makecache -y --disablerepo='*' --enablerepo='kubernetes'" command: "yum -q makecache -y --disablerepo='*' --enablerepo='kubernetes'"