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
|
|
|
|
gpgcheck: true
|
|
|
|
repo_gpgcheck: true
|
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:
|
2018-05-09 23:09:32 +02:00
|
|
|
key: "{{ item }}"
|
2018-05-09 16:19:11 +02:00
|
|
|
state: present
|
2018-05-09 23:09:32 +02:00
|
|
|
register: kubernetes_rpm_key
|
2020-11-18 04:51:21 +01:00
|
|
|
with_items: "{{ kubernetes_yum_gpg_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
|
2018-05-10 00:04:46 +02:00
|
|
|
args:
|
2018-09-28 05:17:50 +02:00
|
|
|
warn: false
|