moved config change out of if/then
diff --git a/templates/datadog.conf.erb b/templates/datadog.conf.erb
index 4dd9610..b2c4527 100644
--- a/templates/datadog.conf.erb
+++ b/templates/datadog.conf.erb
@@ -350,8 +350,7 @@
# ========================================================================== #
# Custom Templates from Puppet #
# ========================================================================== #
+<% end -%>
#Enable/disable process monitoring on datadog_agent v5
process_agent_enabled: <%= @process_agent_enabled %>
-
-<% end -%>