Create the ansible inventory file for kubernets 3 nodes cluster
Add the follow line in the
[master] localhost ansible_connection=local [workers] worker01 ansible_connection=ssh ansible_user=root worker02 ansible_connection=ssh ansible_user=root
Generate the ssh key in the master server and copy the public key in the work node root user. Also enable the root user ssh access for the worker nodes.