try dynamic ips
This commit is contained in:
parent
70887e076c
commit
e427bbbdaa
2 changed files with 4 additions and 3 deletions
|
@ -19,13 +19,13 @@ defaults
|
|||
|
||||
frontend ssh
|
||||
mode tcp
|
||||
bind 192.168.122.62:22
|
||||
bind {{ ipv4 }}:22
|
||||
|
||||
default_backend ssh
|
||||
|
||||
frontend http
|
||||
mode tcp
|
||||
bind 192.168.122.62:80
|
||||
bind {{ ipv4 }}:80
|
||||
|
||||
default_backend http
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
{% from tpldir+"/map.jinja" import haproxy with context %}
|
||||
{% set ipv4 = grains['ip4_interfaces']['eth0'][0] %}
|
||||
|
||||
haproxy_pkg_pkgs:
|
||||
pkg.installed:
|
||||
|
@ -18,7 +19,7 @@ haproxy_pkg_conf_dir:
|
|||
haproxy_pkg_config:
|
||||
file.managed:
|
||||
- name: /etc/haproxy/haproxy.cfg
|
||||
- source: salt://{{ tpldir }}/files/haproxy_config
|
||||
- source: salt://{{ tpldir }}/files/haproxy_config.jinja
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: '0644'
|
||||
|
|
Loading…
Reference in a new issue