'How does Ansible skip the human interaction page during package installation

I would like to upgrade MySQL from 5.7 to 8.0 on my Ubuntu 18.04

I installed the package with the command :

$ sudo dpkg -i mysql-apt-config_0.8.22-1_all.deb

And I have this page pop up and need to manually select the option. enter image description here

Is there any way I can do automatic upgrade MySQL by Ansible?

I am very new to Ansible, any help is appreciated!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source