defaults: &defaults
  host: localhost
  port: 5672
  vhost: /
  user: publishing_api
  pass: publishing_api
  recover_from_connection_close: true

development:
  <<: *defaults
  exchange: published_documents

test:
  <<: *defaults
  exchange: published_documents_test

production:
  hosts:
    - rabbitmq-1.backend
    - rabbitmq-2.backend
    - rabbitmq-3.backend
  user: publishing_api
  pass: <%= ENV['RABBITMQ_PASSWORD'] %>
  port: 5672
  vhost: /
  exchange: published_documents
  recover_from_connection_close: true

defaults: &defaults
  host: localhost
  port: 5672
  vhost: /
  user: publishing_api
  pass: publishing_api
  recover_from_connection_close: true

development:
  <<: *defaults
  exchange: published_documents

test:
  <<: *defaults
  exchange: published_documents_test

production:
  hosts:
    <% hosts = ENV['RABBITMQ_HOSTS'] || 'localhost' %>
    <% hosts.split(",").each do |host| %>
    - <% host %>
    <% end %>
  user: publishing_api
  pass: <%= ENV['RABBITMQ_PASSWORD'] %>
  port: 5672
  vhost: /
  exchange: published_documents
  recover_from_connection_close: true

Use rabbbitmq hosts defined in an environment variable.
Use rabbbitmq hosts defined in an environment variable.

We now access these via different naming schemes in different environments
so accept the values provided by puppet rather than the hard coded
ones.
