Skip to content

Commit

Permalink
Merge pull request #464 from dragonsmith/feature/web_console_ip
Browse files Browse the repository at this point in the history
Listen ip address configuration for management console.
  • Loading branch information
michaelklishin authored Oct 16, 2017
2 parents f426f61 + 9c1a8b3 commit 5635b6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@
# Change non SSL web console listen port
default['rabbitmq']['web_console_port'] = 15672

# Add an ability to set web console listen ip.
default['rabbitmq']['web_console_interface'] = nil

# tcp listen options
default['rabbitmq']['tcp_listen'] = true
default['rabbitmq']['tcp_listen_packet'] = 'raw'
Expand Down
6 changes: 6 additions & 0 deletions templates/default/rabbitmq.config.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<% if node['rabbitmq']['web_console_ssl'] -%>
{rabbitmq_management, [
{listener, [{port, <%= node['rabbitmq']['web_console_ssl_port'] %>},
<% if node['rabbitmq']['web_console_interface'] -%>
{ip, "<%= node['rabbitmq']['web_console_interface'] %>"},
<% end -%>
{ssl, true},
{ssl_opts, [{cacertfile,"<%= node['rabbitmq']['ssl_cacert'] %>"},
{certfile,"<%= node['rabbitmq']['ssl_cert'] %>"},
Expand All @@ -22,6 +25,9 @@
{rabbitmq_management, [
{listener, [
{port, <%= node['rabbitmq']['web_console_port'] %>}
<% if node['rabbitmq']['web_console_interface'] -%>
,{ip, "<%= node['rabbitmq']['web_console_interface'] %>"}
<% end -%>
]}
]},
<% end %>
Expand Down

0 comments on commit 5635b6e

Please sign in to comment.