Skip to content

Commit

Permalink
return actual error from module logic on gcp_compute (ansible#55055)
Browse files Browse the repository at this point in the history
* return actual error from module logic on gcp_compute

* changing how the error is presented

* sanity
  • Loading branch information
rambleraptor authored and ansibot committed Apr 9, 2019
1 parent ebd4462 commit 5215d00
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/ansible/plugins/inventory/gcp_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@
from ansible.module_utils.gcp_utils import GcpSession, navigate_hash, GcpRequestException
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable

try:
import google.auth
import requests
except ImportError:
raise AnsibleError('The gcp dynamic inventory plugin requires the requests and google-auth libraries')


# Mocking a module to reuse module_utils
class GcpMockModule(object):
Expand Down

0 comments on commit 5215d00

Please sign in to comment.