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

  • Instead of shell, it's possible to start service service: name=unattended-upgrades state=started – Vladimir Botka Jan 7 at 23:50
  • Thanks man, can you please tell me how to generate a report of this Ansible playbook after execute – karan Jan 8 at 14:46
  • Which playbook are you talking about? – Vladimir Botka Jan 8 at 14:48
  • The same which I mention above – karan Jan 8 at 16:00
  • So, after starting unattended-upgrades, auto update is started, or we need to do other stuff or any command/module? – karan Jan 8 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.