return actual error from module logic on gcp_compute (#55055)
* return actual error from module logic on gcp_compute * changing how the error is presented * sanity
This commit is contained in:
parent
ebd4462c23
commit
5215d00462
1 changed files with 6 additions and 0 deletions
|
@ -124,6 +124,12 @@ from ansible.module_utils._text import to_native
|
|||
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):
|
||||
|
|
Loading…
Reference in a new issue