# Generated by Chef, local modifications will be overwritten

instances:
  # for every instance a 'rabbitmq_api_url' must be provided, pointing to the api
  # url of the RabbitMQ Managment Plugin (http://www.rabbitmq.com/management.html)
  # optional: 'rabbitmq_user' (default: guest), 'rabbitmq_pass' (default: guest), and 'ssl_verify' (default: true)
<% @instances.each do |i| -%>
  - rabbitmq_api_url: <%= i['api_url'] %>
    rabbitmq_user: <%= i['user'] || 'guest' %>
    rabbitmq_pass: <%= i['pass'] || 'guest' %>
    ssl_verify: <%= i['ssl_verify'] || 'true' %>
  <% if i.key?('tags') -%>
    tags:
    <% i['tags'].each do |x| -%>
    - <%= x %>
    <% end -%>
  <% end -%>
  <% if i.key?('nodes') -%>
    nodes:
    <% i['nodes'].each do |x| -%>
    - <%= x %>
    <% end -%>
  <% end -%>
  <% if i.key?('nodes_regexes') -%>
    nodes_regexes:
    <% i['nodes_regexes'].each do |x| -%>
    - <%= x %>
    <% end -%>
  <% end -%>
  <% if i.key?('queues') -%>
    queues:
    <% i['queues'].each do |x| -%>
    - <%= x %>
    <% end -%>
  <% end -%>
  <% if i.key?('queues_regexes') -%>
    queues_regexes:
    <% i['queues_regexes'].each do |x| -%>
    - <%= x %>
    <% end -%>
  <% end -%>
  <% if i.key?('vhosts') -%>
    vhosts:
    <% i['vhosts'].each do |x| -%>
    - <%= x %>
    <% end -%>
  <% end -%>
<% end -%>

# Nothing to configure here
init_config:
