Permalink
Browse files

Don't set conditional

  • Loading branch information...
1 parent b7d07a9 commit f7c3c49de74f66e3cd6a2c633640b6a2bb016c71 @cmur2 committed Jan 8, 2014
Showing with 10 additions and 10 deletions.
  1. +4 −4 attributes/default.rb
  2. +6 −6 templates/default/prosody.cfg.lua.erb
View
@@ -54,10 +54,10 @@
default['prosody']['ssl']['certificate'] = "/etc/prosody/certs/localhost.crt"
default['prosody']['c2s_require_encryption'] = false
default['prosody']['s2s_require_encryption'] = false
-#default['prosody']['allow_anonymous_s2s'] = false
-#default['prosody']['s2s_secure_auth'] = false
-#default['prosody']['s2s_insecure_domains'] = []
-#default['prosody']['s2s_secure_domains'] = []
+default['prosody']['allow_anonymous_s2s'] = false
+default['prosody']['s2s_secure_auth'] = false
+default['prosody']['s2s_insecure_domains'] = []
+default['prosody']['s2s_secure_domains'] = []
default['prosody']['log'] = [
{ 'levels' => ["error"], 'to' => "syslog" },
{ 'levels' => ["error"], 'to' => "file", 'filename' => "/var/log/prosody/prosody.err" },
@@ -57,19 +57,19 @@ pidfile = <%= @node.lua_type(@config[:pidfile]) %>;
ssl = <%= @node.lua_type(@config[:ssl]) %>;
-- Require encryption on client/server connections?
-<%= "c2s_require_encryption = #{@node.lua_type(@config[:c2s_require_encryption])};" if @config.key?(:c2s_require_encryption) %>
-<%= "s2s_require_encryption = #{@node.lua_type(@config[:s2s_require_encryption])};" if @config.key?(:s2s_require_encryption) %>
+c2s_require_encryption = <%= @node.lua_type(@config[:c2s_require_encryption]) %>;
+s2s_require_encryption = <%= @node.lua_type(@config[:s2s_require_encryption]) %>;
-<%= "allow_anonymous_s2s = #{@node.lua_type(@config[:allow_anonymous_s2s])};" if @config.key?(:allow_anonymous_s2s) %>
+allow_anonymous_s2s = <%= @node.lua_type(@config[:allow_anonymous_s2s]) %>;
-- Set the default security policy for s2s connections:
-<%= "s2s_secure_auth = #{@node.lua_type(@config[:s2s_secure_auth])};" if @config.key?(:s2s_secure_auth) %>
+s2s_secure_auth = <%= @node.lua_type(@config[:s2s_secure_auth]) %>;
-- These hosts are allowed to authenticate via weaker mechanisms, such as dialback:
-<%= "s2s_insecure_domains = #{@node.lua_type(@config[:s2s_insecure_domains])};" if @config.key?(:s2s_insecure_domains) %>
+s2s_insecure_domains = <%= @node.lua_type(@config[:s2s_insecure_domains]) %>;
-- Whatever the value of s2s_secure_auth, these domains must always present valid certificates:
-<%= "s2s_secure_domains = #{@node.lua_type(@config[:s2s_secure_domains])};" if @config.key?(:s2s_secure_domains) %>
+s2s_secure_domains = <%= @node.lua_type(@config[:s2s_secure_domains]) %>;
-- Debian:
-- all to var/log

0 comments on commit f7c3c49

Please sign in to comment.