Skip to content

Instantly share code, notes, and snippets.

@gravyboat
Created February 27, 2014 19:02
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 gravyboat/9256809 to your computer and use it in GitHub Desktop.
Save gravyboat/9256809 to your computer and use it in GitHub Desktop.
example haproxy conf.
{% if grains['hostname'] == 'myHost' %}
param1 = value1
{% elif grains['hostname'] == 'myOtherHost' %}
param1 = value2
{% else %}
param1 = value3
{% endif %}
You could also do:
{% if 'dev' in grains['hostname'] %}
param1 = value1
{% elif 'prod' in grains['hostname'] %}
param1 = value2
{% else %}
param1 = value3
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment