community.general.rabbitmq_vhost_limits (0.1.1) — module

Manage the state of virtual host limits in RabbitMQ

Authors: Hiroyuki Matsuo (@h-matsuo)

preview | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

This module sets/clears certain limits on a virtual host.

The configurable limits are I(max_connections) and I(max-queues).

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Limit both of the max number of connections and queues on the vhost '/'.
- rabbitmq_vhost_limits:
    vhost: /
    max_connections: 64
    max_queues: 256
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Limit the max number of connections on the vhost '/'.
# This task implicitly clears the max number of queues limit using default value: -1.
- rabbitmq_vhost_limits:
    vhost: /
    max_connections: 64
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Clear the limits on the vhost '/'.
- rabbitmq_vhost_limits:
    vhost: /
    state: absent

Inputs

    
node:
    description:
    - Name of the RabbitMQ Erlang node to manage.

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Specify whether the limits are to be set or cleared.
    - If set to C(absent), the limits of both I(max_connections) and I(max-queues) will
      be cleared.

vhost:
    default: /
    description:
    - Name of the virtual host to manage.

max_queues:
    default: -1
    description:
    - Max number of queues.
    - Negative value means "no limit".
    - Ignored when the I(state) is C(absent).

max_connections:
    default: -1
    description:
    - Max number of concurrent client connections.
    - Negative value means "no limit".
    - Ignored when the I(state) is C(absent).