我将尝试在epp模板中使用$server_facts‘’environment‘,但他的工作方式不正确。我的epp代码:
<% if $::facts[environment] == 'production' { -%>
# this is production server
<% } else { -%>
# this is NOT production server
<% } -%>代码运行时没有错误,但始终在else之后使用部分。请帮我修一下。
发布于 2017-05-31 14:14:45
使用$::facts[agent_specified_environment]后一切正常工作
<% if $::facts[agent_specified_environment] == 'production' { -%>
# this is production server
<% } else { -%>
# this is NOT production server
<% } -%>https://stackoverflow.com/questions/44285834
复制相似问题