added missing haproxy_config file
This commit is contained in:
parent
631e3a4b96
commit
e7f7eded96
22
resources/haproxy_config/actions/update.yml
Normal file
22
resources/haproxy_config/actions/update.yml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# TODO
|
||||||
|
- hosts: [{{ip}}]
|
||||||
|
sudo: yes
|
||||||
|
vars:
|
||||||
|
config_dir: {src: {{ config_dir.value['src'] }}, dst: {{ config_dir.value['dst'] }}}
|
||||||
|
haproxy_ip: {{ ip }}
|
||||||
|
haproxy_services:
|
||||||
|
{% for service, ports, listen_port, protocol in zip(configs.value, configs_ports.value, listen_ports.value, configs_protocols.value) %}
|
||||||
|
- name: {{ service['emitter_attached_to'] }}
|
||||||
|
listen_port: {{ listen_port['value'] }}
|
||||||
|
protocol: {{ protocol['value'] }}
|
||||||
|
servers:
|
||||||
|
{% for server_ip, server_port in zip(service['value'], ports['value']) %}
|
||||||
|
- name: {{ server_ip['emitter_attached_to'] }}
|
||||||
|
ip: {{ server_ip['value'] }}
|
||||||
|
port: {{ server_port['value'] }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
tasks:
|
||||||
|
- file: path={{ config_dir.value['src'] }}/ state=directory
|
||||||
|
- file: path={{ config_dir.value['src'] }}/haproxy.cfg state=touch
|
||||||
|
- template: src={{ resource_dir }}/templates/haproxy.cfg dest=/etc/haproxy/haproxy.cfg
|
Loading…
Reference in New Issue
Block a user