Sha256: d8aec08d9f499ec6adc656b3640cf4e77fcc95e2ad1dd6980a12fd9e550fa4bf
Contents?: true
Size: 1.4 KB
Versions: 34
Compression:
Stored size: 1.4 KB
Contents
# touch /etc/keepalived/MASTER to make a BACKUP keepalived be MASTER. Remove it to make it BACKUP again. vrrp_script chk_wanted_state { script "test -e /etc/keepalived/MASTER" interval <%= keepalived_chk_wanted_state_interval || keepalived_default_script_interval %> weight <%= keepalived_chk_wanted_state_weight || keepalived_default_script_weight %> } <% keepalived_scripts.each do |name, settings| %> vrrp_script chk_<%= name.to_s %> { script "<%= settings[:script] %>" interval <%= settings[:interval] || keepalived_default_script_interval %> weight <%= settings[:weight] || keepalived_default_script_weight %> } <% end %> <% instance_counter = 1 %> <% keepalived_instances.each do |virtual_ipaddress, settings| %> vrrp_instance VI_<%= instance_counter %> { interface <%= settings[:interface] %> state <%= settings[:state] %> virtual_router_id <%= settings[:virtual_router_id] %> priority <%= settings[:priority] %> virtual_ipaddress { <%= virtual_ipaddress %> } <% if settings[:state] != 'MASTER' %> track_script { chk_wanted_state } <% end %> <% (settings[:scripts].nil? || [settings[:scripts]].flatten.empty? ? keepalived_scripts.keys : [settings[:scripts]].flatten).each do |name| %> track_script { chk_<%= name.to_s %> } <% end %> } <% instance_counter += 1 %> <% end %>
Version data entries
34 entries across 34 versions & 1 rubygems