diff --git a/lib/refrepo/gen/puppet/templates/kadeployg5k.conf.erb b/lib/refrepo/gen/puppet/templates/kadeployg5k.conf.erb
index f33e8e502945bb29ce50b5a9b169718825d9f0d1..519e9aa36df372f0711cf0712548d420b17af960 100644
--- a/lib/refrepo/gen/puppet/templates/kadeployg5k.conf.erb
+++ b/lib/refrepo/gen/puppet/templates/kadeployg5k.conf.erb
@@ -98,9 +98,11 @@ pxe:
 automata:
   macrosteps:
     SetDeploymentEnv:
+<%- if data['trusted_env'] -%>
     - timeout: <%= data['deployment.timeout'] %>
       type: Trusted
       retries: <%= data['deployment.retries'].nil? ? 1 : data['deployment.retries'] %>
+<%- end -%>
     - timeout: <%= data['deployment.timeout'] %>
       type: Untrusted
       retries: <%= data['deployment.retries'].nil? ? 1 : data['deployment.retries'] %>