Last active
November 22, 2017 22:01
-
-
Save JeffMelton/571bd689706f4a0a045c54a97a3db691 to your computer and use it in GitHub Desktop.
attempting to build an haproxy.cfg template for SaltStack
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
frontend www | |
bind {{ salt['grains.get']('ip4_interfaces:eth1') | first }}:80 | |
default_backend nginx_pool | |
backend nginx_pool | |
balance roundrobin | |
mode tcp | |
{% for server, addr in salt['mine.get']('minion[2,3]', 'network.ip_addrs', expr_form='compound').items() -%} | |
server {{ server }} {{ addr }}:80 check | |
{% endfor -%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment