Command line for System Upgrades

22 views
Skip to first unread message

Rick Belscher

unread,
Dec 22, 2016, 12:26:25 PM12/22/16
to Ansible Project
I am working on patching multiple ubuntu systems and have run into an issue and I am unable to find a solution.   I'm pretty new to ansible so not sure if it's possible to respond to prompts by OS.

Here is what I run now:

ansible <host_group> -m shell -s -a "apt-get upgrade -y" -u <user> -k -K

This works for apt-get update
                     apt-get install --only-upgrade

This issue on the upgrade on these systems:

1.  There are 5 points during the upgrade that require response with enter on a y/n answer and a No<enter> prompt for PAM.

Is there a way do do this via command line.

Brian Coca

unread,
Dec 22, 2016, 12:35:14 PM12/22/16
to ansible...@googlegroups.com
I would try using the apt module first. If that does not deal with it as you want it to, I would use debconf + apt or if you insist on using direct commands, the expect module.


----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages