Updates to roles/kubeadm/tasks/main.yml to resolve an error installing kubelet and a deprecation warning about Ansible apt usage.
Description
1) Deprecation warning "Invoking 'apt' only once while using a loop via squash_actions is deprecated" was coming up based on used of with_items in apt loop in the "Install k8s ... Y'all" task. Fix was to place array of packages in pkg and drop with_items.
2) "No package matching 'kubelet' is available" error encountered in same task. Fix was to add update_cache: yes to apt operation so new apt sources added in previous task get picked up.
Reordering of some elements in the "Install k8s ... Y'all" task was just me being pedantic. ;)
Testing
First test was to resume previously failed partial install. Subsequent test was to wipe all SD cards on my four node cluster and run a clean install. Both succeeded.
Issue Number
kubelet installation failure is called out in issue 57 (though, it's not the primary focus of that issue.)
Updates to
roles/kubeadm/tasks/main.yml
to resolve an error installing kubelet and a deprecation warning about Ansible apt usage.Description
1) Deprecation warning "Invoking 'apt' only once while using a loop via squash_actions is deprecated" was coming up based on used of
with_items
inapt
loop in the "Install k8s ... Y'all" task. Fix was to place array of packages inpkg
and dropwith_items
. 2) "No package matching 'kubelet' is available" error encountered in same task. Fix was to addupdate_cache: yes
toapt
operation so new apt sources added in previous task get picked up.Reordering of some elements in the "Install k8s ... Y'all" task was just me being pedantic. ;)
Testing
First test was to resume previously failed partial install. Subsequent test was to wipe all SD cards on my four node cluster and run a clean install. Both succeeded.
Issue Number
kubelet installation failure is called out in issue 57 (though, it's not the primary focus of that issue.)