community.rabbitmq.rabbitmq_policy (1.3.0) — module

Manage the state of policies in RabbitMQ

Authors: John Dewey (@retr0h)

Install collection

Install with ansible-galaxy collection install community.rabbitmq:==1.3.0


Add to requirements.yml

  collections:
    - name: community.rabbitmq
      version: 1.3.0

Description

Manage the state of a policy in RabbitMQ.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: ensure the default vhost contains the HA policy via a dict
  community.rabbitmq.rabbitmq_policy:
    name: HA
    pattern: .*
  args:
    tags:
      ha-mode: all
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: ensure the default vhost contains the HA policy
  community.rabbitmq.rabbitmq_policy:
    name: HA
    pattern: .*
    tags:
      ha-mode: all

Inputs

    
name:
    description:
    - The name of the policy to manage.
    required: true
    type: str

node:
    default: rabbit
    description:
    - Erlang node name of the rabbit we wish to configure.
    type: str

tags:
    default: null
    description:
    - A dict or string describing the policy. Required when C(state=present). This option
      is no longer required as of Ansible 2.9.
    required: false
    type: dict

state:
    choices:
    - present
    - absent
    default: present
    description:
    - The state of the policy.
    type: str

vhost:
    default: /
    description:
    - The name of the vhost to apply to.
    type: str

pattern:
    default: null
    description:
    - A regex of queues to apply the policy to. Required when C(state=present). This option
      is no longer required as of Ansible 2.9.
    required: false
    type: str

apply_to:
    choices:
    - all
    - exchanges
    - queues
    default: all
    description:
    - What the policy applies to. Requires RabbitMQ 3.2.0 or later.
    type: str

priority:
    default: '0'
    description:
    - The priority of the policy.
    type: str