Here we are trying to start auto updating packages in Ubuntu through Ansible playbook.
dpkg-reconfigure -plow unattended-upgrades
When we run this command manually, it shows the following prompt, and it starts updating packages :-
Configuring unattended-upgrades
Applying updates on a frequent basis is an important part of keeping
systems secure. By default, updates need to be applied manually using
package management tools.
Alternatively, you can choose to have this system automatically download and install important updates.
Automatically download and install stable updates?
<Yes> <No>
But running this command with Ansible it stopped at this step
How we can skip this prompt while running this command with Ansible playbook.
Playbook code is following:-
ansible-code for updating Ubuntu packages