anchor.diff:  <%= pattern %> <%= protocol %><%= host %>:<%= port %><%= format %>
   <% end -%>
   <% elsif scope.lookupvar('rsyslog::client::log_remote') -%>
  +
   # Log to remote syslog server using <%= scope.lookupvar('rsyslog::client::remote_type') %>
   <% if scope.lookupvar('rsyslog::client::remote_type') == 'tcp' -%>
   *.* @@<%= scope.lookupvar('rsyslog::client::server') -%>:<%= scope.lookupvar('rsyslog::client::port') -%>;RSYSLOG_ForwardFormat
  
positive.code: <% end -%>
  <% end -%>
  <% if scope.lookupvar('rsyslog::client::log_auth_local') or scope.lookupvar('rsyslog::client::log_local') -%>
  <% if scope.lookupvar('rsyslog::client::ssl') -%>
  # Setup SSL connection.
  # CA/Cert
  $DefaultNetStreamDriverCAFile <%= scope.lookupvar('rsyslog::client::ssl_ca') %>
  
  # Connection settings.
  $DefaultNetstreamDriver gtls
  $ActionSendStreamDriverMode 1
  $ActionSendStreamDriverAuthMode anon
  <% end -%>
  
  # Logging locally.
  
  
negative.code: $ActionQueueType LinkedList     # run asynchronously
  $ActionResumeRetryCount -1      # infinety retries if host is down
  <% if scope.lookupvar('rsyslog::client::log_templates') and ! scope.lookupvar('rsyslog::client::log_templates').empty?-%>
  
  # Define custom logging templates
  <% scope.lookupvar('rsyslog::client::log_templates').flatten.compact.each do |log_template| -%>
  $template <%= log_template['name'] %>,"<%= log_template['template'] %>"
  <% end -%>
  <% end -%>
  <% if scope.lookupvar('rsyslog::client::actionfiletemplate') -%>
  
  # Using specified format for default logging format:
  $ActionFileDefaultTemplate <%= scope.lookupvar('rsyslog::client::actionfiletemplate') %>
  <% else -%>
  
  #Using default format for default logging format:
  $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
  <% end -%>
  <% if scope.lookupvar('rsyslog::client::ssl') -%>
  
  # Setup SSL connection.
  # CA/Cert
  $DefaultNetStreamDriverCAFile <%= scope.lookupvar('rsyslog::client::ssl_ca') %>
  
  # Connection settings.
  $DefaultNetstreamDriver gtls
  $ActionSendStreamDriverMode 1
  $ActionSendStreamDriverAuthMode anon
  <% end -%>
  <% if scope.lookupvar('rsyslog::client::preserve_fqdn') -%>
  
  # Tell rsyslog to use FQDN and not short server names
  $PreserveFQDN on 
  <% end -%>
  <% if scope.lookupvar('rsyslog::client::remote_servers')  -%>
  
  <% scope.lookupvar('rsyslog::client::remote_servers').flatten.compact.each do |server| -%>
  <% if server['pattern'] and server['pattern'] != ''-%>
  <% pattern = server['pattern'] -%>
  