【发布时间】:2019-01-31 17:01:42
【问题描述】:
我们有 puppet 版本 3.8.7。我有返回 dovecot 版本的事实:2.2 或 2.3。在 erb 模板中,我有下一个构造:
# SSL/TLS protocols to use
111 <% if @dovecot_version =~ "2.2" -%>
112 ssl_protocols = !SSLv2 !SSLv3
113
114 # Diffie-Hellman parameters length
115 ssl_dh_parameters_length = 2048
116 <% else -%>
117 ssl_min_protocol = SSLv3
118
119 # Diffie-Hellman parameters length
120 #ssl_dh_parameters_length = 2048
121 <% end -%>
应用后,我看到下一条错误消息:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to parse template cpanel/dovecot.conf.erb:
Filepath: org/jruby/RubyString.java
Line: 1730
Detail: type mismatch: String given
at /etc/puppet/environments/testing/modules/cpanel/manifests/dovecot.pp:34 on node server1.development.local
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
变量类型有什么问题?我如何比较字符串?谢谢你的回答
【问题讨论】: