Better error msg for basic.get_bin_path()

Include the searched paths in the error message.
This commit is contained in:
Adrian Likins 2016-12-19 18:14:04 -05:00 committed by Brian Coca
parent 35fef6fb84
commit 2597c1236d

View file

@ -1843,7 +1843,7 @@ class AnsibleModule(object):
bin_path = path bin_path = path
break break
if required and bin_path is None: if required and bin_path is None:
self.fail_json(msg='Failed to find required executable %s' % arg) self.fail_json(msg='Failed to find required executable %s in paths: %s' % (arg, os.pathsep.join(paths)))
return bin_path return bin_path
def boolean(self, arg): def boolean(self, arg):