community.rabbitmq.rabbitmq_binding – Manage rabbitMQ bindings

Note

This plugin is part of the community.rabbitmq collection (version 1.1.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.rabbitmq.

To use it in a playbook, specify: community.rabbitmq.rabbitmq_binding.

Synopsis

  • This module uses rabbitMQ REST APIs to create / delete bindings.

Requirements

The below requirements are needed on the host that executes this module.

  • requests >= 1.0.0

Parameters

Parameter

Comments

arguments

dictionary

extra arguments for exchange. If defined this argument is a key/value dictionary

Default: {}

ca_cert

aliases: cacert

path

CA certificate to verify SSL connection to management API.

client_cert

aliases: cert

path

Client certificate to send on SSL connections to management API.

client_key

aliases: key

path

Private key matching the client certificate.

destination

aliases: dst, dest

string / required

destination exchange or queue for the binding.

destination_type

aliases: type, dest_type

string / required

Either queue or exchange.

Choices:

  • queue

  • exchange

login_host

string

RabbitMQ host for connection.

Default: “localhost”

login_password

string

RabbitMQ password for connection.

Default: “guest”

login_port

string

RabbitMQ management API port.

Default: “15672”

login_protocol

string

RabbitMQ management API protocol.

Choices:

  • http ← (default)

  • https

login_user

string

RabbitMQ user for connection.

Default: “guest”

name

aliases: src, source

string / required

source exchange to create binding on.

routing_key

string

routing key for the binding.

Default: “#”

state

string

Whether the bindings should be present or absent.

Choices:

  • present ← (default)

  • absent

vhost

string

RabbitMQ virtual host.

Default: “/”

Examples

# Bind myQueue to directExchange with routing key info
- community.rabbitmq.rabbitmq_binding:
    name: directExchange
    destination: myQueue
    type: queue
    routing_key: info

# Bind directExchange to topicExchange with routing key *.info
- community.rabbitmq.rabbitmq_binding:
    name: topicExchange
    destination: topicExchange
    type: exchange
    routing_key: '*.info'

Authors

  • Manuel Sousa (@manuel-sousa)