Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix indentation for cluster_nodes #1002

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spec/classes/rabbitmq_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@
end

it 'for cluster_nodes' do
is_expected.to contain_file('rabbitmq.config').with('content' => %r{cluster_nodes.*\['rabbit@hare-1', 'rabbit@hare-2'\], ram})
is_expected.to contain_file('rabbitmq.config').with('content' => %r{^ {4}\{cluster_nodes, \{\['rabbit@hare-1', 'rabbit@hare-2'\], ram})
end
end

Expand All @@ -423,7 +423,7 @@
end

it 'for cluster_nodes' do
is_expected.to contain_file('rabbitmq.config').with('content' => %r{cluster_nodes.*\[\], ram})
is_expected.to contain_file('rabbitmq.config').with('content' => %r{^ {4}\{cluster_nodes, \{\[\], ram})
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions templates/rabbitmq.config.epp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
{auth_backends, [rabbit_auth_backend_internal, rabbit_auth_backend_ldap]},
<% } -%>
<% if $rabbitmq::config::config_cluster {-%>
<% if !$rabbitmq::config::cluster_nodes.empty {-%>
<%- if !$rabbitmq::config::cluster_nodes.empty {-%>
{cluster_nodes, {['rabbit@<%= $rabbitmq::config::cluster_nodes.join("', 'rabbit@") %>'], <%= $rabbitmq::config::cluster_node_type %>}},
<% } else {%>
<%- } else {-%>
{cluster_nodes, {[], <%= $rabbitmq::config::cluster_node_type %>}},
<% } %>
<%- } -%>
{cluster_partition_handling, <%= $rabbitmq::config::cluster_partition_handling %>},
<% } -%>
{tcp_listen_options, [
Expand Down
Loading