ansible.builtin.rabbitmq_binding (v2.3.2.0-1) — module

This module manages rabbitMQ bindings

| "added in version" 2.0 of ansible.builtin"

Authors: Manuel Sousa (@manuel-sousa)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.3.2.0.post1

Description

This module uses rabbitMQ Rest API to create/delete bindings


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Bind myQueue to directExchange with routing key info
- rabbitmq_binding:
    name: directExchange
    destination: myQueue
    type: queue
    routing_key: info
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Bind directExchange to topicExchange with routing key *.info
- rabbitmq_binding:
    name: topicExchange
    destination: topicExchange
    type: exchange
    routing_key: '*.info'

Inputs

    
name:
    aliases:
    - src
    - source
    description:
    - source exchange to create binding on
    required: true

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Whether the exchange should be present or absent
    - Only present implemented atm
    required: false

vhost:
    default: /
    description:
    - rabbitMQ virtual host
    - default vhost is /
    required: false

arguments:
    default: {}
    description:
    - extra arguments for exchange. If defined this argument is a key/value dictionary
    required: false

login_host:
    default: localhost
    description:
    - rabbitMQ host for connection
    required: false

login_port:
    default: 15672
    description:
    - rabbitMQ management api port
    required: false

login_user:
    default: guest
    description:
    - rabbitMQ user for connection
    required: false

destination:
    aliases:
    - dst
    - dest
    description:
    - destination exchange or queue for the binding
    required: true

routing_key:
    default: '#'
    description:
    - routing key for the binding
    - default is
    required: false

login_password:
    default: false
    description:
    - rabbitMQ password for connection
    required: false

destination_type:
    aliases:
    - type
    - dest_type
    choices:
    - queue
    - exchange
    description:
    - Either queue or exchange
    required: true