Skip to content

Commit

Permalink
Add var assert checks
Browse files Browse the repository at this point in the history
  • Loading branch information
whitfiea committed Oct 22, 2024
1 parent b261531 commit 19c6b49
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions ibm/mas_devops/playbooks/oneclick_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,19 @@
assert:
that:
# IBM
- lookup('env', 'IBM_ENTITLEMENT_KEY') != ""
- lookup('env', 'IBM_ENTITLEMENT_KEY') != "" or ibm_entitlement_key is defined
# MAS
- lookup('env', 'MAS_INSTANCE_ID') != ""
- lookup('env', 'MAS_CONFIG_DIR') != ""
- lookup('env', 'MAS_INSTANCE_ID') != "" or mas_instance_id is defined
- lookup('env', 'MAS_CONFIG_DIR') != "" or mas_config_dir is defined
# SLS
- (lookup('env', 'SLS_LICENSE_ID') != "" and lookup('env', 'SLS_LICENSE_FILE') != "") or
(lookup('env', 'SLS_ENTITLEMENT_FILE') != "")
- ((lookup('env', 'SLS_LICENSE_ID') != "" and lookup('env', 'SLS_LICENSE_FILE') != "") or
sls_license_id is defined and sls_license_file is defined) or
(lookup('env', 'SLS_ENTITLEMENT_FILE') != "" or sls_entitlement_file is defined)
# DRO
- lookup('env', 'DRO_CONTACT_EMAIL') != ""
- lookup('env', 'DRO_CONTACT_FIRSTNAME') != ""
- lookup('env', 'DRO_CONTACT_LASTNAME') != ""
fail_msg: "One or more required environment variables are not defined"
- lookup('env', 'DRO_CONTACT_EMAIL') != "" or dro_contact_email is defined
- lookup('env', 'DRO_CONTACT_FIRSTNAME') != "" or dro_contact_firstname is defined
- lookup('env', 'DRO_CONTACT_LASTNAME') != "" or dro_contact_lastname is defined
fail_msg: "One or more required environment variables or ansible variables are not defined"

roles:
# 1. Install cluster-scoped dependencies (e.g. Cert-Manager, Operator Catalogs) & Grafana
Expand Down

0 comments on commit 19c6b49

Please sign in to comment.