1 |
On 7/18/22 12:23 AM, J. Roeleveld wrote: |
2 |
> I've been using ansible for some of my automation scripts and am |
3 |
> happy with the way that works. The existing implementations for |
4 |
> "adding users" and such is tested plenty by others and does actually |
5 |
> check if the user exists before trying to add one. |
6 |
|
7 |
ACK |
8 |
|
9 |
> I only use expect to automate the login-process as mentioned in the |
10 |
> original email. |
11 |
|
12 |
I've been a fan of the sshpass command explicitly for sshing into |
13 |
systems. Though I've gotten it to work for a few other very similar things. |
14 |
|
15 |
> The line it's expecting is more then just "*?assword" like in all |
16 |
> the examples. |
17 |
> |
18 |
> Currently, SSH puts the password-prompt as: |
19 |
> (<username>@<hostname>) Password: |
20 |
> |
21 |
> As I know both, the expected string is this full line. If SSH changes |
22 |
> its behaviour, the script will simply fail. |
23 |
|
24 |
Nice! |
25 |
|
26 |
|
27 |
|
28 |
-- |
29 |
Grant. . . . |
30 |
unix || die |