I'll try use $server_facts['environment'] in epp template, but he dont work correct. My epp code:
<% if $::facts[environment] == 'production' { -%>
# this is production server
<% } else { -%>
# this is NOT production server
<% } -%>
code run without error but always use section after else
. Please help fix it.
答案 0 :(得分:1)
使用后$::facts[agent_specified_environment]
完成所有工作正常:
<% if $::facts[agent_specified_environment] == 'production' { -%>
# this is production server
<% } else { -%>
# this is NOT production server
<% } -%>