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 {auth_backends, [rabbit_auth_backend_internal, rabbit_auth_backend_ldap]},
11 <% if @config_cluster -%>
12 {cluster_nodes, {[<%= @cluster_nodes.map { |n| "\'rabbit@#{n}\'" }.join(', ') %>], <%= @cluster_node_type %>}},
13 {cluster_partition_handling, <%= @cluster_partition_handling %>},
15 <%- if @tcp_keepalive -%>
16 {tcp_listen_options, [{keepalive, true}]},
20 <%- elsif @interface != 'UNSET' -%>
21 {tcp_listeners, [{"<%= @interface%>", <%= @port %>}]},
24 <%- if @ssl_interface != 'UNSET' -%>
25 {ssl_listeners, [{"<%= @ssl_interface%>", <%= @ssl_port %>}]},
27 {ssl_listeners, [<%= @ssl_port %>]},
30 <%- if @ssl_cacert != 'UNSET' -%>
31 {cacertfile,"<%= @ssl_cacert %>"},
33 {certfile,"<%= @ssl_cert %>"},
34 {keyfile,"<%= @ssl_key %>"},
35 {verify,<%= @ssl_verify %>},
36 {fail_if_no_peer_cert,<%= @ssl_fail_if_no_peer_cert %>}
37 <%- if @ssl_versions -%>
38 ,{versions, [<%= @ssl_versions.sort.map { |v| "'#{v}'" }.join(', ') %>]}
40 <%- if @ssl_ciphers and @ssl_ciphers.size > 0 -%>
42 <%= @ssl_ciphers.sort.map{|k| "{#{k}}"}.join(",\n ") %>
47 <% if @config_variables -%>
48 <%- @config_variables.keys.sort.each do |key| -%>
49 {<%= key %>, <%= @config_variables[key] %>},
52 {default_user, <<"<%= @default_user %>">>},
53 {default_pass, <<"<%= @default_pass %>">>}
54 ]}<% if @config_kernel_variables -%>,
56 <%= @config_kernel_variables.sort.map{|k,v| "{#{k}, #{v}}"}.join(",\n ") %>
59 <%- if @admin_enable -%>,
60 {rabbitmq_management, [
63 {port, <%= @ssl_management_port %>},
65 {ssl_opts, [<%- if @ssl_cacert != 'UNSET' -%>{cacertfile, "<%= @ssl_cacert %>"},<%- end -%>
67 {certfile, "<%= @ssl_cert %>"},
68 {keyfile, "<%= @ssl_key %>"}
69 <%- if @ssl_versions -%>
70 ,{versions, [<%= @ssl_versions.sort.map { |v| "'#{v}'" }.join(', ') %>]}
72 <%- if @ssl_ciphers and @ssl_ciphers.size > 0 -%>
74 <%= @ssl_ciphers.sort.map{|k| "{#{k}}"}.join(",\n ") %>
79 {port, <%= @management_port %>}
84 <% if @config_stomp -%>,
85 % Configure the Stomp Plugin listening port
87 {tcp_listeners, [<%= @stomp_port %>]}
88 <%- if @ssl && @ssl_stomp_port -%>,
89 {ssl_listeners, [<%= @ssl_stomp_port %>]}
93 <%- if @ldap_auth -%>,
94 % Configure the LDAP authentication plugin
95 {rabbitmq_auth_backend_ldap, [
96 {other_bind, <%= @ldap_other_bind %>},
97 {servers, ["<%= @ldap_server %>"]},
98 {user_dn_pattern, "<%= @ldap_user_dn_pattern %>"},
99 {use_ssl, <%= @ldap_use_ssl %>},
100 {port, <%= @ldap_port %>},
101 <% if @ldap_config_variables -%>
102 <%- @ldap_config_variables.keys.sort.each do |key| -%>
103 {<%= key %>, <%= @ldap_config_variables[key] %>},
106 {log, <%= @ldap_log %>}