How can i control user inputs when a command is executing and ask me something for example :
sudo apt-get install mariadb-server
when you run this command in ubuntu it asked you please enter new password for mysql user root and then again it ask to enter password again for confirmation . how can i pass a variable for example mariadbpass to this command because everytime ansible run this hangs and failed so i have to login to servers and run manually this
dpkg --configure -a
to enter prompted password and its confirmation.
thank you