1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

make bin/ansible error output consistent for shell module as for the command module when no arguments

This commit is contained in:
Serge van Ginderachter 2013-04-11 19:43:31 +02:00
parent 4e79bd0872
commit 94243e983f

View file

@ -93,8 +93,9 @@ class Cli(object):
print ' %s' % host
sys.exit(0)
if options.module_name == 'command' and not options.module_args:
print >>sys.stderr, "No argument passed to command module"
if ((options.module_name == 'command' or options.module_name == 'shell')
and not options.module_args):
print >>sys.stderr, "No argument passed to %s module" % options.module_name
sys.exit(1)
sshpass = None