если тебе надо просто latest, то версию не обязательно указывать
`
- name: Install kubelet, kubeadm, and kubectl
apt:
name:
- kubelet=1.28.4
- kubeadm=1.28.4
- kubectl=1.28.4
state: present
`
TASK [Install kubelet, kubeadm, and kubectl] **********************************************************************************************************************************************************************************************************************************
fatal: [k8s_workert1]: FAILED! => {"changed": false, "msg": "No package matching 'kubelet' is available"}
fatal: [k8s_workert2]: FAILED! => {"changed": false, "msg": "No package matching 'kubelet' is available"}
fatal: [k8s_mastert]: FAILED! => {"cache_update_time": 1701775189, "cache_updated": false, "changed": false, "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\" install 'kubelet=1.28.4' 'kubeadm=1.28.4' 'kubectl=1.28.4'' failed: E: Version '1.28.4' for 'kubelet' was not found\nE: Version '1.28.4' for 'kubeadm' was not found\nE: Version '1.28.4' for 'kubectl' was not found\n", "rc": 100, "stderr": "E: Version '1.28.4' for 'kubelet' was not found\nE: Version '1.28.4' for 'kubeadm' was not found\nE: Version '1.28.4' for 'kubectl' was not found\n", "stderr_lines": ["E: Version '1.28.4' for 'kubelet' was not found", "E: Version '1.28.4' for 'kubeadm' was not found", "E: Version '1.28.4' for 'kubectl' was not found"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nPackage kubeadm is not available, but is referred to by another package.\nThis may mean that the package is missing, has been obsoleted, or\nis only available from another source\n\nPackage kubelet is not available, but is referred to by another package.\nThis may mean that the package is missing, has been obsoleted, or\nis only available from another source\n\nPackage kubectl is not available, but is referred to by another package.\nThis may mean that the package is missing, has been obsoleted, or\nis only available from another source\n\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "Package kubeadm is not available, but is referred to by another package.", "This may mean that the package is missing, has been obsoleted, or", "is only available from another source", "", "Package kubelet is not available, but is referred to by another package.", "This may mean that the package is missing, has been obsoleted, or", "is only available from another source", "", "Package kubectl is not available, but is referred to by another package.", "This may mean that the package is missing, has been obsoleted, or", "is only available from another source", ""]}
вот ошибка