chore: remove old haproxy tasks
This commit is contained in:
parent
e4f89095c6
commit
cf3195fcd2
@ -1,50 +0,0 @@
|
|||||||
# {{ ansible_managed }}
|
|
||||||
global_defs {
|
|
||||||
script_user keepalived_script
|
|
||||||
enable_script_security
|
|
||||||
}
|
|
||||||
|
|
||||||
vrrp_script chk_haproxy{
|
|
||||||
script "/etc/keepalived/scripts.d/chk_haproxy.sh"
|
|
||||||
interval 3
|
|
||||||
weight 0
|
|
||||||
rise 6
|
|
||||||
fall 1
|
|
||||||
}
|
|
||||||
|
|
||||||
vrrp_instance {{ deploy_keepalived_vrrp_instance_name }} {
|
|
||||||
interface {{ deploy_keepalived_interface }}
|
|
||||||
|
|
||||||
state {{ deploy_keepalived_state }}
|
|
||||||
virtual_router_id {{ deploy_keepalived_router_id }}
|
|
||||||
priority {{ deploy_keepalived_priority }}
|
|
||||||
advert_int {{ deploy_keepalived_advert_interval }}
|
|
||||||
|
|
||||||
nopreempt
|
|
||||||
|
|
||||||
{% if deploy_keepalived_unicast_peers %}
|
|
||||||
unicast_src_ip {{ deploy_keepalived_unicast_source }}
|
|
||||||
unicast_peer {
|
|
||||||
{% for peer in deploy_keepalived_unicast_peers %}
|
|
||||||
{{ peer }}
|
|
||||||
{% endfor %}
|
|
||||||
}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
authentication {
|
|
||||||
auth_type PASS
|
|
||||||
auth_pass {{ deploy_keepalived_auth_passwd }}
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual_ipaddress {
|
|
||||||
{% for vip in deploy_keepalived_virtual_ips %}
|
|
||||||
{{ vip }}
|
|
||||||
{% endfor %}
|
|
||||||
}
|
|
||||||
|
|
||||||
track_script {
|
|
||||||
chk_haproxy
|
|
||||||
}
|
|
||||||
|
|
||||||
notify {{ deploy_keepalived_scripts_dir }}/{{ deploy_keepalived_notify_script }}
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
function do_ping() {
|
|
||||||
wget -q -O /dev/null --server-response "http://127.0.0.1:9000/health" 2>&1 | awk '/^ HTTP/{print $2}'
|
|
||||||
}
|
|
||||||
|
|
||||||
ping_result=$(do_ping)
|
|
||||||
echo "Ping result: $ping_result"
|
|
||||||
|
|
||||||
if [ "$ping_result" = "200" ]; then
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
@ -1,25 +0,0 @@
|
|||||||
---
|
|
||||||
- name: "HAProxy"
|
|
||||||
block:
|
|
||||||
- name: "Include ednz_cloud.deploy_haproxy"
|
|
||||||
ansible.builtin.include_role:
|
|
||||||
name: ednz_cloud.deploy_haproxy
|
|
||||||
|
|
||||||
- name: "Include ednz_cloud.deploy_keepalived"
|
|
||||||
ansible.builtin.include_role:
|
|
||||||
name: ednz_cloud.deploy_keepalived
|
|
||||||
|
|
||||||
- name: "Register haproxy services in consul"
|
|
||||||
when: enable_consul | bool
|
|
||||||
block:
|
|
||||||
- name: "Register haproxy services in consul"
|
|
||||||
community.general.consul:
|
|
||||||
token: "{{ _credentials.consul.root_token.secret_id }}"
|
|
||||||
host: "127.0.0.1"
|
|
||||||
scheme: "{{ consul_api_scheme }}"
|
|
||||||
port: "{{ consul_api_port[consul_api_scheme] }}"
|
|
||||||
validate_certs: false
|
|
||||||
service_name: haproxy
|
|
||||||
service_port: 80
|
|
||||||
interval: 20s
|
|
||||||
http: http://localhost:9000/health
|
|
Loading…
Reference in New Issue
Block a user