<commit_before>## MANAGED BY PUPPET ##

global_defs {
   notification_email {
<% if notification_email.is_a?(String) -%>
    <%= notification_email %>
<% else -%>
<% notification_email.each do |email| -%>
    <%= email %>
<% end -%>
<% end -%>
   }
   notification_email_from keepalived@<%= fqdn %>

   smtp_server <%= smtp_server %>
   smtp_connect_timeout 10

   lvs_id <%= fqdn %>
} # END global_defs

vrrp_sync_group VG1 {
    group {
<%- vrrp_instances.keys.each do |instance| -%>
        <% if instance != '__params' %><%= instance %><% end %>
<% end -%>
    }
<% if vrrp_instances['__params'] -%>
  <% vrrp_instances['__params'].each do |key,value| -%>
  <%= key %> <%= value %>
  <% end -%>
<% end -%>
}

<% vrrp_instances.each do |instance,config| -%>
<% if instance != '__params' %>
vrrp_instance <%= instance -%> {
    state <%= state %>
    interface <%= config['interface'] %>
    virtual_router_id <%= config['router_id'] %>
    lvs_sync_daemon_interface <%= config['interface'] %>
    priority <%= priority %>
    advert_int 1
    smtp_alert
    <% if config['notify_master'] %>notify_master "<%= config['notify_master'] %>"<%- end %>
    authentication {
        auth_type <%= config['auth_type'] %>
        auth_pass <%= config['auth_pass'] %>
        }
    virtual_ipaddress {
        <%= config['vip'] %>
    }
}
<% end -%>
<% end -%>

<% virtual_server_groups.each do |group,config| -%>
virtual_server_group <%= group -%> {
    <%= config['ip'] %> <%= config['port'] %>
<% if config['additional_services'] -%>
<% config['additional_services'].each do |service| -%>
    <%= service %>
<% end -%>
<% end -%>
}
<commit_msg>Make virtual servers optional.<commit_after>## MANAGED BY PUPPET ##

global_defs {
   notification_email {
<% if notification_email.is_a?(String) -%>
    <%= notification_email %>
<% else -%>
<% notification_email.each do |email| -%>
    <%= email %>
<% end -%>
<% end -%>
   }
   notification_email_from keepalived@<%= fqdn %>

   smtp_server <%= smtp_server %>
   smtp_connect_timeout 10

   lvs_id <%= fqdn %>
} # END global_defs

vrrp_sync_group VG1 {
    group {
<%- vrrp_instances.keys.each do |instance| -%>
        <% if instance != '__params' %><%= instance %><% end %>
<% end -%>
    }
<% if vrrp_instances['__params'] -%>
  <% vrrp_instances['__params'].each do |key,value| -%>
  <%= key %> <%= value %>
  <% end -%>
<% end -%>
}

<% vrrp_instances.each do |instance,config| -%>
<% if instance != '__params' %>
vrrp_instance <%= instance -%> {
    state <%= state %>
    interface <%= config['interface'] %>
    virtual_router_id <%= config['router_id'] %>
    lvs_sync_daemon_interface <%= config['interface'] %>
    priority <%= priority %>
    advert_int 1
    smtp_alert
    <% if config['notify_master'] %>notify_master "<%= config['notify_master'] %>"<%- end %>
    authentication {
        auth_type <%= config['auth_type'] %>
        auth_pass <%= config['auth_pass'] %>
        }
    virtual_ipaddress {
        <%= config['vip'] %>
    }
}
<% end -%>
<% end -%>

<%- if virtual_server_groups = '' -%><%- virtual_server_groups = [] -%><%- end -%>
<% virtual_server_groups.each do |group,config| -%>
virtual_server_group <%= group -%> {
    <%= config['ip'] %> <%= config['port'] %>
<% if config['additional_services'] -%>
<% config['additional_services'].each do |service| -%>
    <%= service %>
<% end -%>
<% end -%>
}

{'fraction_non_alphanumeric': 0.2121301775147929, 'fraction_numerical': 0.002366863905325444, 'mean_word_length': 3.385214007782101, 'pattern_counts': {'":': 0, '<': 98, '<?xml version=': 0, '>': 98, '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': '1659234', 'n_tokens_mistral': 1369, 'n_tokens_neox': 1195, 'n_words': 203}