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
|
frontend ssh
|
||||||
mode tcp
|
mode tcp
|
||||||
bind 192.168.122.62:22
|
bind {{ ipv4 }}:22
|
||||||
|
|
||||||
default_backend ssh
|
default_backend ssh
|
||||||
|
|
||||||
frontend http
|
frontend http
|
||||||
mode tcp
|
mode tcp
|
||||||
bind 192.168.122.62:80
|
bind {{ ipv4 }}:80
|
||||||
|
|
||||||
default_backend http
|
default_backend http
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{% from tpldir+"/map.jinja" import haproxy with context %}
|
{% from tpldir+"/map.jinja" import haproxy with context %}
|
||||||
|
{% set ipv4 = grains['ip4_interfaces']['eth0'][0] %}
|
||||||
|
|
||||||
haproxy_pkg_pkgs:
|
haproxy_pkg_pkgs:
|
||||||
pkg.installed:
|
pkg.installed:
|
||||||
|
@ -18,7 +19,7 @@ haproxy_pkg_conf_dir:
|
||||||
haproxy_pkg_config:
|
haproxy_pkg_config:
|
||||||
file.managed:
|
file.managed:
|
||||||
- name: /etc/haproxy/haproxy.cfg
|
- name: /etc/haproxy/haproxy.cfg
|
||||||
- source: salt://{{ tpldir }}/files/haproxy_config
|
- source: salt://{{ tpldir }}/files/haproxy_config.jinja
|
||||||
- user: root
|
- user: root
|
||||||
- group: root
|
- group: root
|
||||||
- mode: '0644'
|
- mode: '0644'
|
||||||
|
|
Loading…
Reference in a new issue