I have been playing also with the automation of cluster creation.
My solution is using Expect. I am using Ansible for many other tasks, so I have used the Expect module for Ansible. But you can use Expect program for Linux.
This is my ansible task to add a node to my cluster. I have a previous...