For production deployments of 3 or 5 servers, or where you are provisioning a server backup, ensure the manager server node can ssh into all the other worker and backup nodes.
SSH into manager server node and create an ssh key. Press Enter for defaults and no passphrase
Print the key for copying:
Copy the key and exit the manager node.
SSH into the 2 or 4 worker nodes to add the key into the .ssh/authorised_keys for all nodes
echo "<manager-node-public-key>" >> ~/.ssh/authorized_keys
SSH into the manager server node, and confirm that you can SSH into all nodes from inside the manager node.
If you are setting up a backup server, ensure that the manager server node can ssh into that too. SSH into the backup node to add the key into its .ssh/authorised_keys file.
You are now ready to exit all nodes and run the Ansible command from your local environment to install the required dependencies on the servers.