mirror of
https://github.com/geerlingguy/ansible-role-kubernetes.git
synced 2024-11-18 19:10:39 +01:00
21 lines
627 B
YAML
21 lines
627 B
YAML
---
|
|
- name: Ensure Kubernetes repository exists.
|
|
yum_repository:
|
|
name: kubernetes
|
|
description: Kubernetes
|
|
enabled: true
|
|
gpgcheck: "{{ kubernetes_yum_gpg_check }}"
|
|
repo_gpgcheck: "{{ kubernetes_yum_repo_gpg_check }}"
|
|
baseurl: "{{ kubernetes_yum_base_url }}"
|
|
gpgkey: "{{ kubernetes_yum_gpg_key }}"
|
|
|
|
- name: Add Kubernetes GPG keys.
|
|
rpm_key:
|
|
key: "{{ kubernetes_yum_gpg_key }}"
|
|
state: present
|
|
register: kubernetes_rpm_key
|
|
|
|
- name: Make cache if Kubernetes GPG key changed.
|
|
command: "yum -q makecache -y --disablerepo='*' --enablerepo='kubernetes'"
|
|
when: kubernetes_rpm_key is changed
|