mirror of
https://github.com/ansible/awx.git
synced 2026-05-15 21:37:42 -02:30
Merge pull request #8308 from rebeccahhh/awxkit_errormessage_correction
correct error message when calling tower_AWXKit collections module and venv doesn't have it Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -24,7 +24,7 @@ class TowerAWXKitModule(TowerModule):
|
|||||||
|
|
||||||
# Die if we don't have AWX_KIT installed
|
# Die if we don't have AWX_KIT installed
|
||||||
if not HAS_AWX_KIT:
|
if not HAS_AWX_KIT:
|
||||||
self.exit_json(msg=missing_required_lib('awxkit'))
|
self.fail_json(msg=missing_required_lib('awxkit'))
|
||||||
|
|
||||||
# Establish our conneciton object
|
# Establish our conneciton object
|
||||||
self.connection = Connection(self.host, verify=self.verify_ssl)
|
self.connection = Connection(self.host, verify=self.verify_ssl)
|
||||||
@@ -38,7 +38,7 @@ class TowerAWXKitModule(TowerModule):
|
|||||||
self.connection.login(username=self.username, password=self.password)
|
self.connection.login(username=self.username, password=self.password)
|
||||||
self.authenticated = True
|
self.authenticated = True
|
||||||
except Exception:
|
except Exception:
|
||||||
self.exit_json("Failed to authenticate")
|
self.fail_json("Failed to authenticate")
|
||||||
|
|
||||||
def get_api_v2_object(self):
|
def get_api_v2_object(self):
|
||||||
if not self.apiV2Ref:
|
if not self.apiV2Ref:
|
||||||
|
|||||||
Reference in New Issue
Block a user