Skip to content

An Ansible Role for installing, configuring, and managing RabbitMQ

License

Notifications You must be signed in to change notification settings

galaxyproject/ansible-role-rabbitmq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

An Ansible Role for installing, configuring, and managing RabbitMQ

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages