Skip to content

Latest commit

 

History

History
167 lines (122 loc) · 3.85 KB

README.md

File metadata and controls

167 lines (122 loc) · 3.85 KB

galaxyproject.rabbitmq

Ansible Role

galaxyproject.rabbitmq is an Ansible role for installing RabbitMQ and managing its virtual hosts, users, and plugins.

To use Docker, see the usegalaxy_eu.rabbitmqserver role instead.

Requirements

None

Role Variables

See defaults for a full list.

Server Configuration

See:

Only "New-style" configuration via rabbitmq.conf is supported.

Set the rabbitmq_config variable to set configuration options.

rabbitmq_config:
  listeners:
    tcp: none
  ssl_listeners:
    default: 5671
  ssl_options:
    cacertfile: /etc/ssl/certs/fullchain.pem
    certfile: /etc/ssl/certs/cert.pem
    keyfile: /etc/ssl/user/privkey-rabbitmq.pem
    verify: verify_peer
    fail_if_no_peer_cert: false
    versions:
      - tlsv1.3
      - tlsv1.2

Users

See:

Set the rabbitmq_users variable to define an array of users. Parameters and defaults are described in the rabbitmq_user module documentation.

rabbitmq_users:
- user: guest
  state: absent
- user: admin
  password: admin
  tags: administrator

Virtual Hosts

See:

Set the rabbitmq_vhosts variable to define an array of virtual hosts. Parameters and defaults are described in the rabbitmq_vhost module documentation.

rabbitmq_vhosts:
- name: /one
- name: /two
  node: rabbit
  tracing: no
- name: three
  state: absent

Plugins

See:

Set the rabbitmq_plugins variable to define an array of plugins. Parameters and defaults are described in the rabbitmq_plugin module documentation.

rabbitmq_plugins:
- names: rabbitmq_management
- names: rabbitmq_delayed_message_exchange
  state: disabled

Cluster

See:

Set the rabbitmq_cluster variable to enable clustering.

rabbitmq_cluster: yes

Set the rabbitmq_erlang_cookie variable to define the Erlang cookie.

rabbitmq_erlang_cookie: g9avtqdzdm2p5oe9

Dependencies

Example Playbook

- name: RabbitMQ Servers
  hosts: rabbitmq_servers
  vars:
    rabbitmq_config:
      vm_memory_high_watermark:
        relative: 0.8
      disk_free_limit:
        absolute: 500MB
      listeners:
        tcp:
          default: 5672
    rabbitmq_users:
      - user: guest
        state: absent
      - user: admin
        password: admin
        tags: administrator
    rabbitmq_vhosts:
      - name: /one
  roles:
    - galaxyproject.rabbitmq

License

MIT

Author Information

Originally written by Jason Royle.

Additional contributors.