Skip to content

Commit

Permalink
feat: raise error when no api credentials in LagoonActionBase
Browse files Browse the repository at this point in the history
  • Loading branch information
yusufhm authored Feb 14, 2024
1 parent eb5dfac commit 673e626
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/plugins/action/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
class LagoonActionBase(ActionBase):

def createClient(self, task_vars):
if not task_vars.get('lagoon_api_endpoint'):
raise AnsibleError("lagoon_api_endpoint is required")
if not task_vars.get('lagoon_api_token'):
raise AnsibleError("lagoon_api_token is required")
self.client = GqlClient(
self._templar.template(task_vars.get('lagoon_api_endpoint')).strip(),
self._templar.template(task_vars.get('lagoon_api_token')).strip(),
Expand Down

0 comments on commit 673e626

Please sign in to comment.