<commit_before>! Configuration File for keepalived

global_defs {
  notification_email {
    <%= node['private_chef']['notification_email'] %>
  }
  notification_email_from  <%= node['private_chef']['from_email'] %>

  smtp_server <%= @smtp_server %>
  smtp_connect_timeout <%= @smtp_connect_timeout %>
}

vrrp_sync_group <%= @vrrp_sync_group %> {
  group {
    <%= @vrrp_sync_instance %>
  }
}

vrrp_instance <%= @vrrp_sync_instance %> {
    state <%= @vrrp_instance_state %>
    interface <%= @vrrp_instance_interface %>
    virtual_router_id <%= @vrrp_instance_virtual_router_id %>
    priority <%= @vrrp_instance_priority %>
<% if @vrrp_instance_vrrp_unicast_peer.nil? %>
    ! vrrp_unicast_bind <local ip address>
    ! vrrp_unicast_peer <peer ip address>
<% else %>
    vrrp_unicast_bind <%= @vrrp_instance_vrrp_unicast_bind %>
    vrrp_unicast_peer <%= @vrrp_instance_vrrp_unicast_peer %>
<% end %>
    advert_int <%= @vrrp_instance_advert_int %><commit_msg>Use MTA default for services, only webui uses new value<commit_after>! Configuration File for keepalived

global_defs {
  notification_email {
    <%= node['private_chef']['notification_email'] %>
  }

  smtp_server <%= @smtp_server %>
  smtp_connect_timeout <%= @smtp_connect_timeout %>
}

vrrp_sync_group <%= @vrrp_sync_group %> {
  group {
    <%= @vrrp_sync_instance %>
  }
}

vrrp_instance <%= @vrrp_sync_instance %> {
    state <%= @vrrp_instance_state %>
    interface <%= @vrrp_instance_interface %>
    virtual_router_id <%= @vrrp_instance_virtual_router_id %>
    priority <%= @vrrp_instance_priority %>
<% if @vrrp_instance_vrrp_unicast_peer.nil? %>
    ! vrrp_unicast_bind <local ip address>
    ! vrrp_unicast_peer <peer ip address>
<% else %>
    vrrp_unicast_bind <%= @vrrp_instance_vrrp_unicast_bind %>
    vrrp_unicast_peer <%= @vrrp_instance_vrrp_unicast_peer %>
<% end %>
    advert_int <%= @vrrp_instance_advert_int %>
{'fraction_non_alphanumeric': 0.13242249080399368, 'fraction_numerical': 0.0, 'mean_word_length': 5.122186495176849, 'pattern_counts': {'":': 0, '<': 40, '<?xml version=': 0, '>': 40, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '379088', 'n_tokens_mistral': 794, 'n_tokens_neox': 716, 'n_words': 99}