make bin/ansible error output consistent for shell module as for the command…

make bin/ansible error output consistent for shell module as for the command module when no arguments
parent 4e79bd08
...@@ -93,8 +93,9 @@ class Cli(object): ...@@ -93,8 +93,9 @@ class Cli(object):
print ' %s' % host print ' %s' % host
sys.exit(0) sys.exit(0)
if options.module_name == 'command' and not options.module_args: if ((options.module_name == 'command' or options.module_name == 'shell')
print >>sys.stderr, "No argument passed to command module" and not options.module_args):
print >>sys.stderr, "No argument passed to %s module" % options.module_name
sys.exit(1) sys.exit(1)
sshpass = None sshpass = None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment