-
-
Notifications
You must be signed in to change notification settings - Fork 450
Description
Related to #305 but this feature is still lacking so I open a new issue.
Is your feature request related to a problem? Please describe
We would need a better way to enter or prompt sudo password for many remote servers.
It seems that the documentation still lacks an easy guide about how to require SUDO password when deploying to remote machines. #305 suggests use of config.SUDO or config.USE_SUDO_PASSWORD (or --use-sudo-password) which would prompt sudo password for one remote machine, but if you are working on N number of machines to run some tasks it will prompt N times:
$ pyinfra node1,node2,...,node100 t/task.py
--> Preparing Operations...
Loading: t/task.py
[node1] sudo password:
[node2] sudo password:
[node3] sudo password:
[node4] sudo password:
..
[node100] sudo password:
Of course it has to be entered 100 times. Ideally one would want to enter (remote) sudo password only once, assuming the same password would work for all the machines.
#305 and #481 discuss the use of SUDO_ASKPASS, but I was unable to make it work. I would not want to write down secret information somewhere into file, it should be prompted and forgotten every single time when an operation is taking place. Hence, pyinfra should take care of passing SUDO passwords more in a built-in way.
Describe the solution you'd like
Not concrete idea yet. Or any other workaround/suggestions would be appreciated.