anchor.diff:    }
     slave_servers_notify {
   <%-
  -slave_resources.each_with_index do |slave, index|
  -  last = slave_resources.size - 1 == index
  +response_json.each_with_index do |slave, index|
  +  last = response_json.size - 1 == index
     ipv4_address = slave['parameters'].include?('address4')
     ipv6_address = slave['parameters'].include?('address6')
     if ipv4_address
  
positive.code: <%-
  require 'net/http'
  require 'json'
  begin
    http     = Net::HTTP.new(@puppetdb_server, @puppetdb_port)
    request  = Net::HTTP::Get.new('/pdb/query/v4/resources/Knot::Remote')
    response = http.request(request)
    if response.code != "200"
      scope.call_function(
        'warning',
  
negative.code:   scope.call_function('warning', ["unable to connect to the puppetdb server, exported resources wont work: #{e}"])
    return "slave_servers {}\nslave_servers_notify {}\n}\n"
  end
  -%>
    slave_servers {
  <%-    
  response_json.each_with_index do |slave, index|
    last = response_json.size - 1 == index
    ipv4_address = slave['parameters'].include?('address4')
    ipv6_address = slave['parameters'].include?('address6')
    if ipv4_address
  