Parametarize K8s and Ubuntu version

This commit is contained in:
Emil Dabrowski 2023-01-10 21:46:19 +01:00
parent c3405a7063
commit 98de636298
2 changed files with 4 additions and 4 deletions

View file

@ -1,3 +1,4 @@
pod_network_cidr: "10.254.0.0/16"
service_cidr: "10.255.0.0/16"
kubeadmin_config: /etc/kubernetes/admin.conf
k8s_version: 1.26

View file

@ -84,8 +84,7 @@
- name: Setup CRI-O
become: true
vars:
os: xUbuntu_22.04 # fetch this from os-release
version: 1.24
os: xUbuntu_{{ ansible_distribution_version}}
key_dir: /usr/share/keyrings
keys:
{
@ -96,13 +95,13 @@
},
"libcontainers-crio":
{
"url": "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/{{ version }}/{{ os }}/Release.key",
"url": "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/{{ k8s_version }}/{{ os }}/Release.key",
"name": "libcontainers-crio-archive-keyring",
},
}
repos:
- deb [signed-by={{ key_dir }}/libcontainers-archive-keyring.gpg] https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/{{ os }}/ /
- deb [signed-by={{ key_dir }}/libcontainers-crio-archive-keyring.gpg] https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/{{ version }}/{{ os }}/ /
- deb [signed-by={{ key_dir }}/libcontainers-crio-archive-keyring.gpg] https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/{{ k8s_version }}/{{ os }}/ /
block:
- name: Download signing keys
with_dict: "{{ keys }}"