I am trying to write a bash script that contains a command to bootstrap an Ubuntu node client using the knife command. When I execute the script command, the knife command requested the sudo password for the node client, and as soon as I type in the password, it works as expected. But I'm looking for an automatic path without asking for a password. Here is the command I used to bootstrap.
knife bootstrap <IP_ADDRESS> -x <USER_NAME> -P <PASSWORD> --sudo
After checking the boot knife document , I tried to provide an ssh password, as shown below, but with the same result.
knife bootstrap <IP_ADDRESS> --ssh-user <USER_NAME> --ssh-password <PASSWORD> --sudo
What could be wrong with this command. I expect the knife command to automatically log in with the client and bootstrap, but its request, for example,
<IP_ADDRESS> knife sudo password: Enter your password:
Any ideas?
source share