Remove the executable option as it's redundant

reviewable/pr18780/r1
Matt Martz 9 years ago committed by Greg DeKoenigsberg
parent 51cf9a029a
commit ae75c26f87

@ -54,11 +54,6 @@ options:
description: description:
- cd into this directory before running the command - cd into this directory before running the command
required: false required: false
executable:
description:
- change the shell used to execute the command. Should be an absolute
path to the executable.
required: false
responses: responses:
description: description:
- Mapping of expected string and string to respond with - Mapping of expected string and string to respond with
@ -94,7 +89,6 @@ def main():
argument_spec=dict( argument_spec=dict(
command=dict(required=True), command=dict(required=True),
chdir=dict(), chdir=dict(),
executable=dict(),
creates=dict(), creates=dict(),
removes=dict(), removes=dict(),
responses=dict(type='dict', required=True), responses=dict(type='dict', required=True),
@ -107,7 +101,6 @@ def main():
module.fail_json(msg='The pexpect python module is required') module.fail_json(msg='The pexpect python module is required')
chdir = module.params['chdir'] chdir = module.params['chdir']
executable = module.params['executable']
args = module.params['command'] args = module.params['command']
creates = module.params['creates'] creates = module.params['creates']
removes = module.params['removes'] removes = module.params['removes']
@ -156,13 +149,8 @@ def main():
startd = datetime.datetime.now() startd = datetime.datetime.now()
if executable:
cmd = '%s %s' % (executable, args)
else:
cmd = args
try: try:
out, rc = pexpect.runu(cmd, timeout=timeout, withexitstatus=True, out, rc = pexpect.runu(args, timeout=timeout, withexitstatus=True,
events=events, cwd=chdir, echo=echo) events=events, cwd=chdir, echo=echo)
except pexpect.ExceptionPexpect, e: except pexpect.ExceptionPexpect, e:
module.fail_json(msg='%s' % e) module.fail_json(msg='%s' % e)

Loading…
Cancel
Save