community.rabbitmq.rabbitmq_exchange module – Manage rabbitMQ exchange
Note
This module is part of the community.rabbitmq collection (version 1.2.3).
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
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.rabbitmq.rabbitmq_exchange
.
Synopsis
This module uses rabbitMQ Rest API to create/delete exchanges
Requirements
The below requirements are needed on the host that executes this module.
requests >= 1.0.0
Parameters
Parameter |
Comments |
---|---|
Extra arguments for exchange. If defined this argument is a key/value dictionary. Default: |
|
If the exchange should delete itself after all queues/exchanges unbound from it. Choices:
|
|
CA certificate to verify SSL connection to management API. |
|
Client certificate to send on SSL connections to management API. |
|
Private key matching the client certificate. |
|
Whether exchange is durable or not. Choices:
|
|
Type for the exchange. If using x-delayed-message, x-random, x-consistent-hash or x-recent-history the respective plugin on the RabbitMQ server must be enabled. Choices:
|
|
Exchange is available only for other exchanges. Choices:
|
|
RabbitMQ host for connection. Default: |
|
RabbitMQ password for connection. Default: |
|
RabbitMQ management API port. Default: |
|
RabbitMQ management API protocol. Choices:
|
|
RabbitMQ user for connection. Default: |
|
Name of the exchange to create. |
|
Whether the exchange should be present or absent. Choices:
|
|
RabbitMQ virtual host. Default: |
Examples
- name: Create direct exchange
community.rabbitmq.rabbitmq_exchange:
name: directExchange
- name: Create topic exchange on vhost
community.rabbitmq.rabbitmq_exchange:
name: topicExchange
type: topic
vhost: myVhost