From 97246173c2d0725e2e4a0f7899c6060733607d05 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 8 May 2015 18:44:22 +0000 Subject: [PATCH] Various tweaks to the needs-updates script --- scripts/needs-updates | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/needs-updates b/scripts/needs-updates index 494b23fa4e..36a19dbc90 100755 --- a/scripts/needs-updates +++ b/scripts/needs-updates @@ -27,7 +27,6 @@ def main(args): help="list the updates needed", default=False) options, args = parser.parse_args(args) list_updates=options.listupdates - del options.listupdates options.module_name = 'yum' options.module_args = 'list=updates' @@ -48,12 +47,13 @@ def main(args): module_name=options.module_name, module_path=options.module_path, module_args=options.module_args, remote_user=options.remote_user, - host_list=options.inventory, timeout=options.timeout, - forks=options.forks, + host_list=options.inventory, + timeout=300, + forks=10, pattern=options.pattern, - callbacks=mycallback, - transport=options.connection + callbacks=mycallback ) + print "Checking for updates on %s" % (options.pattern) updates = "" needsupdate = [] @@ -75,8 +75,8 @@ def main(args): if msg: print >> sys.stderr, 'Error: %s said %s' % (host, msg) - for host in results['dark']: - print >> sys.stderr, 'Error: Could not reach: %s' % host + for (host,d) in results['dark'].items(): + print "%s failed because (%s)" % (host,d) for host in sorted(needsupdate): print host