Created
August 17, 2015 15:16
-
-
Save powellchristoph/846b69bc39cd84ca5d5d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Contrived example. The main point is I want to give immediate | |
# feedback with the error. | |
# This would come from pillar | |
{% set users = ['joe', 'tim', 'bob'] %} | |
{% for user in users %} | |
{% if user != 'bob' %} | |
{{ user }}: | |
user.present: | |
- fullname: {{ user }} | |
- home: /home/{{ user }} | |
{% else %} | |
<Throw an error here, we don't allow bob as a username.> | |
{% endif %} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment