shell - Python fabric How to send password and yes/no for user prompt -
i have created fabfile multiple hosts.
i automating experiment. when run command "sudo adduser --ingroup hadoop hduser" inquire following.
new unix password confirm password. full name room,ph,etc is info correct? y/ni pass info part of script without prompting user. how can ?
thanks
navaz
why didn't utilize pipes?
for example, automated auto accept, utilize yes, outputs neverending stream of y.
yes | rm *.txt
in case:
local('echo 'your_super_password\n' | sudo adduser --ingroup hadoop hduser')
python shell hadoop fabric
No comments:
Post a Comment