blob: e2f0444b2d889709bd67d64d9af20b99b792ce31 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
---
- name: add repository key
copy:
src: repo.gpg
dest: /etc/apt/keyrings/kubernetes.gpg
register: apt_repo_kubernetes_key
- name: add repository entry
copy:
content: |
deb [signed-by=/etc/apt/keyrings/kubernetes.gpg] https://pkgs.k8s.io/core:/stable:/v{{ ([0, 1] | map('extract', kubernetes_version.split('.'))) | join('.') }}/deb/ /
dest: /etc/apt/sources.list.d/kubernetes.list
register: apt_repo_kubernetes_sources
- name: update apt cache
when: apt_repo_kubernetes_key is changed or
apt_repo_kubernetes_sources is changed
command: apt-get update
|