Skip to content

Instantly share code, notes, and snippets.

@cowmix
Created October 24, 2013 16:06
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 cowmix/ef5461a113c691748013 to your computer and use it in GitHub Desktop.
Save cowmix/ef5461a113c691748013 to your computer and use it in GitHub Desktop.
{% for app, appinfo in pillar.get('apps', {}).items() %}
upstream atlassian_{{app}} {
{% for ips in salt['publish.publish']('*' ~ app ~ '*' ~ pillar['customer-domain'], 'network.ip_addrs', 'eth0').values() %}
server {{ ips[0] }}:{{appinfo['port']}} fail_timeout=0;
}
{% endfor %}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment