def answer_hiera
      # Render pretty JSON, because it is a subset of HOCON
      json = JSON.pretty_generate(answers)
      hocon = Hocon::Parser::ConfigDocumentFactory.parse_string(json)
      hocon.render
    end
def answer_hiera
      # Render pretty JSON, because it is a subset of HOCON
      json = JSON.pretty_generate(answers)
      hocon = Hocon::Parser::ConfigDocumentFactory.parse_string(json)
      hocon.render
    end
This converts a data hash provided by answers, and returns a Puppet
 Enterprise compatible hiera config file ready for use.

 @return [String] a string of parseable hocon
 @example Generating an answer file for a series of hosts
   hosts.each do |host|
     answers = Beaker::Answers.new("2.0", hosts, "master")
     create_remote_file host, "/mypath/answer", answers.answer_hiera
  end