le1t0-deprec 2.1.6.053 → 2.1.6.054
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG
CHANGED
@@ -3,6 +3,12 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
3
3
|
namespace :deprec do
|
4
4
|
namespace :keepalived do
|
5
5
|
|
6
|
+
set :keepalived_default_script_weight, 2
|
7
|
+
set :keepalived_default_script_interval, 1
|
8
|
+
# the two variables below default to the values above
|
9
|
+
set :keepalived_chk_wanted_state_weight, nil
|
10
|
+
set :keepalived_chk_wanted_state_interval, nil
|
11
|
+
|
6
12
|
# :keepalived_scripts should contain a hash where each key is the suffix of the vrrp_script registration,
|
7
13
|
# and the value is again a hash, containing as key => value pairs:
|
8
14
|
# :script => 'killall -0 haproxy' or any script which returns a 0 or 1 exit value
|
@@ -1,15 +1,15 @@
|
|
1
1
|
# touch /etc/keepalived/MASTER to make a BACKUP keepalived be MASTER. Remove it to make it BACKUP again.
|
2
2
|
vrrp_script chk_wanted_state {
|
3
3
|
script "test -e /etc/keepalived/MASTER"
|
4
|
-
interval
|
5
|
-
weight
|
4
|
+
interval <%= keepalived_chk_wanted_state_interval || keepalived_default_script_interval %>
|
5
|
+
weight <%= keepalived_chk_wanted_state_weight || keepalived_default_script_weight %>
|
6
6
|
}
|
7
7
|
|
8
8
|
<% keepalived_scripts.each do |name, settings| %>
|
9
9
|
vrrp_script chk_<%= name.to_s %> {
|
10
10
|
script "<%= settings[:script] %>"
|
11
|
-
interval <%= settings[:interval] %>
|
12
|
-
weight <%= settings[:weight] %>
|
11
|
+
interval <%= settings[:interval] || keepalived_default_script_interval %>
|
12
|
+
weight <%= settings[:weight] || keepalived_default_script_weight %>
|
13
13
|
}
|
14
14
|
<% end %>
|
15
15
|
|