Skip to content

Instantly share code, notes, and snippets.

@ryan-lane
Created April 21, 2015 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryan-lane/dc27a3e0b9deff175492 to your computer and use it in GitHub Desktop.
Save ryan-lane/dc27a3e0b9deff175492 to your computer and use it in GitHub Desktop.
```yaml
{% for var in ['service_name', 'service_instance', 'region'] %}
{% if not grains.get(var, None) %}
{{ var.upper() }} environment variable check:
test.configurable_test_state:
- name: {{ var.upper() }} environment variable not set
- comment: {{ var.upper() }} environment variable must be set
- failhard: True
- changes: False
- result: False
{% endif %}
{% endfor %}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment