From 708d49777d4885b1a8276fec239b4cdaadaa5951 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Fri, 1 Apr 2016 19:50:58 -0700 Subject: [PATCH] Allow async to not need an args file since new-style modules have args embedded --- lib/ansible/modules/utilities/logic/async_wrapper.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/utilities/logic/async_wrapper.py b/lib/ansible/modules/utilities/logic/async_wrapper.py index 55f5283ed79..ce29d238ff8 100644 --- a/lib/ansible/modules/utilities/logic/async_wrapper.py +++ b/lib/ansible/modules/utilities/logic/async_wrapper.py @@ -122,8 +122,11 @@ if __name__ == '__main__': jid = "%s.%d" % (sys.argv[1], os.getpid()) time_limit = sys.argv[2] wrapped_module = sys.argv[3] - argsfile = sys.argv[4] - cmd = "%s %s" % (wrapped_module, argsfile) + if len(sys.argv) >= 5: + argsfile = sys.argv[4] + cmd = "%s %s" % (wrapped_module, argsfile) + else: + cmd = wrapped_module step = 5 # setup job output directory