Use YAML.dump instead of to_yaml
Fixes
MODIFY
templates/default/datadog.yaml.erb
templates/default/datadog.yaml.erb
@@ -180,4 +180,4 @@ agent_config.reject!{ |k,v| v.nil? }
-%>
# Generated by Chef, local modifications will be overwritten
-<%= JSON.parse(agent_config.to_json).to_yaml %>
+<%= YAML.dump(JSON.parse(agent_config.to_json)).to_s %>

Use YAML.dump instead of to_yaml (#813)

Fixes https://github.com/chef/chef/issues/10492