2018-05-09 16:19:11 +02:00
|
|
|
---
|
2018-05-09 23:09:32 +02:00
|
|
|
- name: Ensure Kubernetes repository exists.
|
|
|
|
yum_repository:
|
|
|
|
name: kubernetes
|
|
|
|
description: Kubernetes
|
2018-09-28 05:17:50 +02:00
|
|
|
enabled: true
|
2021-08-23 10:11:06 +02:00
|
|
|
gpgcheck: "{{ kubernetes_yum_gpg_check }}"
|
|
|
|
repo_gpgcheck: "{{ kubernetes_yum_repo_gpg_check }}"
|
2020-11-18 04:51:21 +01:00
|
|
|
baseurl: "{{ kubernetes_yum_base_url }}"
|
|
|
|
gpgkey: "{{ kubernetes_yum_gpg_key }}"
|
2018-05-09 23:09:32 +02:00
|
|
|
|
|
|
|
- name: Add Kubernetes GPG keys.
|
2018-05-09 16:19:11 +02:00
|
|
|
rpm_key:
|
2024-03-06 05:08:09 +01:00
|
|
|
key: "{{ kubernetes_yum_gpg_key }}"
|
2018-05-09 16:19:11 +02:00
|
|
|
state: present
|
2018-05-09 23:09:32 +02:00
|
|
|
register: kubernetes_rpm_key
|
2018-05-09 16:19:11 +02:00
|
|
|
|
2018-05-09 23:09:32 +02:00
|
|
|
- name: Make cache if Kubernetes GPG key changed.
|
|
|
|
command: "yum -q makecache -y --disablerepo='*' --enablerepo='kubernetes'"
|
|
|
|
when: kubernetes_rpm_key is changed
|