forked from rabbitmq/chef-cookbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rabbitmq.config.erb
59 lines (57 loc) · 2.62 KB
/
rabbitmq.config.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
%%%
%% Generated by Chef
%%%
[
{kernel, [
<%= @kernel %>
]},
<% if node['rabbitmq']['web_console_ssl'] -%>
{rabbitmq_management, [
{listener, [{port, <%= node['rabbitmq']['web_console_ssl_port'] %>},
{ssl, true},
{ssl_opts, [{cacertfile,"<%= node['rabbitmq']['ssl_cacert'] %>"},
{certfile,"<%= node['rabbitmq']['ssl_cert'] %>"},
{keyfile,"<%= node['rabbitmq']['ssl_key'] %>"}]}
]}
]},
<% end %>
{rabbit, [
<% if node['rabbitmq']['cluster'] && node['rabbitmq']['cluster_disk_nodes'] -%>
{cluster_nodes, {[<%= node['rabbitmq']['cluster_disk_nodes'].map{|n| "\'#{n}\'"}.sort.join(',') %>], disc}},
{cluster_partition_handling,<%= node['rabbitmq']['cluster_partition_handling'] %>},
<% end %>
<% if node['rabbitmq']['ssl'] -%>
{ssl_listeners, [<%= node['rabbitmq']['ssl_port'] %>]},
{ssl_options, [{cacertfile,"<%= node['rabbitmq']['ssl_cacert'] %>"},
{certfile,"<%= node['rabbitmq']['ssl_cert'] %>"},
{keyfile,"<%= node['rabbitmq']['ssl_key'] %>"},
{verify,<%= node['rabbitmq']['ssl_verify'] %>},
{fail_if_no_peer_cert,<%= node['rabbitmq']['ssl_fail_if_no_peer_cert'] %>}]},
<% end %>
<% if node['rabbitmq']['tcp_listen'] -%>
{tcp_listen_options, [binary, {packet,<%= node['rabbitmq']['tcp_listen_packet'] %>},
{reuseaddr,<%= node['rabbitmq']['tcp_listen_reuseaddr'] %>},
{backlog,<%= node['rabbitmq']['tcp_listen_backlog'] %>},
{nodelay,<%= node['rabbitmq']['tcp_listen_nodelay'] %>},
{exit_on_close,<%= node['rabbitmq']['tcp_listen_exit_on_close'] %>},
{keepalive,<%= node['rabbitmq']['tcp_listen_keepalive'] %>}]},
<% else -%>
{tcp_listeners, []},
<% end %>
<% if node['rabbitmq']['disk_free_limit_relative'] -%>
{disk_free_limit, {mem_relative, <%= node['rabbitmq']['disk_free_limit_relative'] %>}},
<% end %>
<% if node['rabbitmq']['vm_memory_high_watermark'] -%>
{vm_memory_high_watermark, <%= node['rabbitmq']['vm_memory_high_watermark'] %>},
<% end %>
<% if node['rabbitmq']['loopback_users'] -%>
{loopback_users, [<%= node['rabbitmq']['loopback_users'].map{|n| "<<\"#{n}\">>"}.join(',') %>]},
<% end %>
{default_user, <<"<%= node['rabbitmq']['default_user'] %>">>},
{default_pass, <<"<%= node['rabbitmq']['default_pass'] %>">>},
{heartbeat, <%= node['rabbitmq']['heartbeat'] %>}
]}
<% node['rabbitmq']['conf'].each do |key,value| -%>
,{<%= key %>, <%= value %>}
<% end -%>
].