fix for: new ssh session is required after making user a sudoer without password
This commit is contained in:
parent
6385a9bb95
commit
835d777c90
1 changed files with 3 additions and 0 deletions
|
@ -69,6 +69,9 @@ private fun createProvInstanceRemote(
|
||||||
password != null,
|
password != null,
|
||||||
{ "User ${prov.whoami()} not able to sudo on remote machine without password and no password available for the user." })
|
{ "User ${prov.whoami()} not able to sudo on remote machine without password and no password available for the user." })
|
||||||
prov.makeUserSudoerWithNoSudoPasswordRequired(password)
|
prov.makeUserSudoerWithNoSudoPasswordRequired(password)
|
||||||
|
|
||||||
|
// a new session is required after making the user a sudoer without password
|
||||||
|
return remote(host, remoteUser, password)
|
||||||
} else {
|
} else {
|
||||||
throw IllegalStateException("User ${prov.whoami()} not able to sudo on remote machine without password and option not set to enable user to sudo without password.")
|
throw IllegalStateException("User ${prov.whoami()} not able to sudo on remote machine without password and option not set to enable user to sudo without password.")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue