1 % This file managed by Puppet
2 % Template Path: <%= @module_name %>/templates/rabbitmq.config
4 <%- if @ssl and @ssl_versions -%>
5 {ssl, [{versions, [<%= @ssl_versions.sort.map { |v| "'#{v}'" }.join(', ') %>]}]},
9 {heartbeat, <%=@heartbeat%>},
11 <% if @auth_backends -%>
12 {auth_backends, [<%= @auth_backends.map { |v| "#{v}" }.join(', ') %>]},
13 <% elsif @ldap_auth -%>
14 {auth_backends, [rabbit_auth_backend_internal, rabbit_auth_backend_ldap]},
16 <% if @config_cluster -%>
17 {cluster_nodes, {[<%= @cluster_nodes.map { |n| "\'rabbit@#{n}\'" }.join(', ') %>], <%= @cluster_node_type %>}},
18 {cluster_partition_handling, <%= @cluster_partition_handling %>},
20 {tcp_listen_options, [
21 <%- unless @config_ranch -%>
26 <%- if @tcp_keepalive -%>
29 <%- if @tcp_backlog -%>
30 {backlog, <%= @tcp_backlog %>},
32 <%- if @tcp_sndbuf -%>
33 {sndbuf, <%= @tcp_sndbuf %>},
35 <%- if @tcp_recbuf -%>
36 {recbuf, <%= @tcp_recbuf %>},
40 {exit_on_close, false}
42 <%- if @collect_statistics_interval -%>
43 {collect_statistics_interval, <%= @collect_statistics_interval %>},
47 <%- elsif @interface -%>
48 {tcp_listeners, [{"<%= @interface%>", <%= @port %>}]},
51 <%- if @ssl_interface -%>
52 {ssl_listeners, [{"<%= @ssl_interface%>", <%= @ssl_port %>}]},
54 {ssl_listeners, [<%= @ssl_port %>]},
57 <%- if @ssl_cacert -%>
58 {cacertfile,"<%= @ssl_cacert %>"},
60 {certfile,"<%= @ssl_cert %>"},
61 {keyfile,"<%= @ssl_key %>"},
62 <%- if @ssl_cert_password -%>
63 {password, "<%= @ssl_cert_password %>"},
66 {depth,<%= @ssl_depth %>},
68 <%- if @ssl_dhfile -%>
69 {dhfile, "<%= @ssl_dhfile %>"},
71 {secure_renegotiate,<%= @ssl_secure_renegotiate %>},
72 {reuse_sessions,<%= @ssl_reuse_sessions %>},
73 {honor_cipher_order,<%= @ssl_honor_cipher_order %>},
74 {verify,<%= @ssl_verify %>},
75 {fail_if_no_peer_cert,<%= @ssl_fail_if_no_peer_cert %>}
76 <%- if @ssl_versions -%>
77 ,{versions, [<%= @ssl_versions.sort.map { |v| "'#{v}'" }.join(', ') %>]}
79 <%- if @ssl_ciphers and @ssl_ciphers.size > 0 -%>
81 <%= @ssl_ciphers.sort.map{|k| "{#{k}}"}.join(",\n ") %>
86 <% if scope['rabbitmq::config_variables'] -%>
87 <%- scope['rabbitmq::config_variables'].keys.sort.each do |key| -%>
88 {<%= key %>, <%= scope['rabbitmq::config_variables'][key] %>},
91 {default_user, <<"<%= @default_user %>">>},
92 {default_pass, <<"<%= @default_pass %>">>}
93 ]}<% if @config_kernel_variables -%>,
95 <%= @config_kernel_variables.sort.map{|k,v| "{#{k}, #{v}}"}.join(",\n ") %>
98 <%- if @admin_enable or !@config_management_variables.empty? -%>,
99 {rabbitmq_management, [
100 <%- if !@config_management_variables.empty? -%>
101 <%= @config_management_variables.sort.map{|k,v| "{#{k}, #{v}}"}.join(",\n ") %>
103 <%- if @admin_enable -%>
104 <%- if !@config_management_variables.empty? -%>,<%-end-%>
106 <%- if @ssl && @management_ssl -%>
107 <%- if @management_ip_address -%>
108 {ip, "<%= @management_ip_address %>"},
110 {port, <%= @ssl_management_port %>},
112 {ssl_opts, [<%- if @ssl_cacert %>
113 {cacertfile, "<%= @ssl_cacert %>"},
115 {certfile, "<%= @ssl_cert %>"},
116 {keyfile, "<%= @ssl_key %>"},
117 {verify,<%= @ssl_management_verify %>},
118 {fail_if_no_peer_cert,<%= @ssl_management_fail_if_no_peer_cert %>}
119 <%- if @ssl_versions -%>
120 ,{versions, [<%= @ssl_versions.sort.map { |v| "'#{v}'" }.join(', ') %>]}
122 <%- if @ssl_ciphers and @ssl_ciphers.size > 0 -%>
124 <%= @ssl_ciphers.sort.map{|k| "{#{k}}"}.join(",\n ") %>
129 <%- if @management_ip_address -%>
130 {ip, "<%= @management_ip_address %>"},
132 {port, <%= @management_port %>}
138 <% if @config_stomp -%>,
139 % Configure the Stomp Plugin listening port
141 <%- if @stomp_ssl_only -%>
144 {tcp_listeners, [<%= @stomp_port %>]}
146 <%- if @ssl && @ssl_stomp_port -%>
148 {ssl_listeners, [<%= @ssl_stomp_port %>]}
152 <%- if @ldap_auth -%>,
153 % Configure the LDAP authentication plugin
154 {rabbitmq_auth_backend_ldap, [
155 {other_bind, <%= @ldap_other_bind %>},
156 {servers, ["<%= @ldap_server %>"]},
157 <% if @ldap_user_dn_pattern -%>
158 {user_dn_pattern, "<%= @ldap_user_dn_pattern %>"},
160 {use_ssl, <%= @ldap_use_ssl %>},
161 {port, <%= @ldap_port %>},
162 <% if @ldap_config_variables -%>
163 <%- @ldap_config_variables.keys.sort.each do |key| -%>
164 {<%= key %>, <%= @ldap_config_variables[key] %>},
167 {log, <%= @ldap_log %>}
170 <%- if @config_shovel and not @config_shovel_statics.empty? -%>,
173 <%= @config_shovel_statics.sort.map{|k,v| "{#{k},[#{v}]}"}.join(",\n ") %>
176 <%- if @config_additional_variables and not @config_additional_variables.empty? -%>,
178 <%- @config_additional_variables.keys.sort.each do |key| -%>
179 {<%= key %>, <%= @config_additional_variables[key] %>}<%- if key != @config_additional_variables.keys.sort.last %>,<% end %>