Skip to content

Instantly share code, notes, and snippets.

Created November 11, 2016 15:24
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 anonymous/2a70d6aedcac22ba284da9f4804bb641 to your computer and use it in GitHub Desktop.
Save anonymous/2a70d6aedcac22ba284da9f4804bb641 to your computer and use it in GitHub Desktop.
{% set image = salt['pillar.get']('localhost:5000/docker/{{pillar ["app"] }}/latest') -%}
{% set image_installs = salt['mine.get_docker'](interfaces="eth0") -%}
{% for image_name, info in image_installs.items() if 'ipv4' in info %}
{% for ip_ in info['ipv4'][pillar ['port'] ] %}
{% set ipaddr = ip_ %}
proxy_pass http://{{ipaddr}};
proxy_read_timeout 90;
{%break%}
{% endfor %}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment