Getting started

Default configuration

The role will detect if an existing installation of RabbitMQ done by the debops.rabbitmq_server role is present on a host. If it's found, the Management Console will be configured locally. Otherwise, no RabbitMQ configuration will take place, but role will still install the nginx server on a host and configure a reverse proxy instance. In that case, you might want to modify the rabbitmq_management__app_host, rabbitmq_management__app_port and rabbitmq_management__app_protocol parameters to point to a remote RabbitMQ Management Console instance.

Example inventory

To configure RabbitMQ Management Console on a host, it should be added to the [debops_service_rabbitmq_management] Ansible inventory group:

[debops_service_rabbitmq_management]
hostname

Example playbook

If you are using this role without DebOps, here's an example Ansible playbook that uses the debops.rabbitmq_management role:

---

- name: Configure RabbitMQ Management Console
  hosts: [ 'debops_service_rabbitmq_management' ]
  become: True

  environment: '{{ inventory__environment | d({})
                   | combine(inventory__group_environment | d({}))
                   | combine(inventory__host_environment  | d({})) }}'

  roles:

    - role: debops.rabbitmq_server/env
      tags: [ 'role::rabbitmq_server', 'role::secret', 'role::rabbitmq_server:config' ]
      when: rabbitmq_management__local|bool

    - role: debops.secret
      tags: [ 'role::secret', 'role::rabbitmq_server', 'role::rabbitmq_server:config' ]
      secret__directories:
        - '{{ rabbitmq_server__secret__directories }}'
      when: rabbitmq_management__local|bool

    - role: debops.etc_services
      tags: [ 'role::etc_services', 'skip::etc_services' ]
      etc_services__dependent_list:
        - '{{ rabbitmq_management__etc_services__dependent_list }}'
      when: rabbitmq_management__local|bool

    - role: debops.apt_preferences
      tags: [ 'role::apt_preferences', 'skip::apt_preferences' ]
      apt_preferences__dependent_list:
        - '{{ nginx__apt_preferences__dependent_list }}'

    - role: debops.ferm
      tags: [ 'role::ferm', 'skip::ferm' ]
      ferm__dependent_rules:
        - '{{ nginx__ferm__dependent_rules }}'

    - role: debops.python
      tags: [ 'role::python', 'skip::python' ]
      python__dependent_packages3:
        - '{{ nginx__python__dependent_packages3 }}'
      python__dependent_packages2:
        - '{{ nginx__python__dependent_packages2 }}'

    - role: debops.nginx
      tags: [ 'role::nginx', 'skip::nginx' ]
      nginx__dependent_servers:
        - '{{ rabbitmq_management__nginx__dependent_servers }}'
      nginx__dependent_upstreams:
        - '{{ rabbitmq_management__nginx__dependent_upstreams }}'

    - role: debops.rabbitmq_server
      tags: [ 'role::rabbitmq_server', 'skip::rabbitmq_server' ]
      rabbitmq_server__dependent_role: 'rabbitmq_management'
      rabbitmq_server__dependent_state: '{{ rabbitmq_management__deploy_state }}'
      rabbitmq_server__dependent_config:
        - '{{ rabbitmq_management__rabbitmq_server__dependent_config }}'
      when: rabbitmq_management__local|bool

    - role: debops.rabbitmq_management
      tags: [ 'role::rabbitmq_management', 'skip::rabbitmq_management' ]