blob: 0a551f2a5207b3f25fb71a478771fb082f09fe91 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
if node['disableHttp']
protocol = "https"
be_port = node['BE']['https_port']
else
protocol = "http"
be_port = node['BE']['http_port']
end
template "/var/tmp/check_Backend_Health.py" do
source "check_Backend_Health.py.erb"
sensitive true
mode 0755
variables({
:protocol => protocol,
:be_ip => node['Nodes']['BE'],
:be_port => be_port
})
end
bash "executing-check_Backend_Health" do
code <<-EOH
python /var/tmp/check_Backend_Health.py
rc=$?
if [[ $rc != 0 ]]; then exit $rc; fi
EOH
end
|