Skip to content

Instantly share code, notes, and snippets.

@gravyboat
Last active August 29, 2015 13:56
Show Gist options
  • Save gravyboat/9258214 to your computer and use it in GitHub Desktop.
Save gravyboat/9258214 to your computer and use it in GitHub Desktop.
salt module to check values.
# Put this in /srv/salt/_modules/myutils.py
# Call from Jinja with {{ salt['myutils.check_vals']() }}
def check_vals():
if __pillar__['val'] != __pillar__['val2']:
raise Exception("Invalid data!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment