Fix OpenStack module failure output

The exception message, when shade fails, will contain much more
specific information about the failure if the exception is treated
as a string. The 'message' attribute alone is usually not helpful.
This commit is contained in:
David Shrewsbury 2016-01-13 11:00:16 -05:00 committed by Matt Clay
parent 18ff22348a
commit aed44e8886
24 changed files with 24 additions and 24 deletions

View file

@ -57,7 +57,7 @@ def main():
auth_token=cloud.auth_token,
service_catalog=cloud.service_catalog))
except shade.OpenStackCloudException as e:
module.fail_json(msg=e.message)
module.fail_json(msg=str(e))
# this is magic, see lib/ansible/module_common.py
from ansible.module_utils.basic import *