community.rabbitmq.rabbitmq_vhost 模块 – 管理 RabbitMQ 中虚拟主机的状态

注意

此模块是 community.rabbitmq 集合 (版本 1.3.0) 的一部分。

如果您使用的是 ansible 包,则可能已经安装了此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用:ansible-galaxy collection install community.rabbitmq

要在 playbook 中使用它,请指定:community.rabbitmq.rabbitmq_vhost

概要

  • 管理 RabbitMQ 中虚拟主机的状态

参数

参数

注释

name

别名:vhost

字符串 / 必需

要管理的虚拟主机的名称

节点

字符串

我们希望配置的 Rabbit 的 Erlang 节点名称

默认值: "rabbit"

状态

字符串

虚拟主机的状态

选项

  • "present" ← (默认)

  • "absent"

tracing

别名:trace

布尔值

启用/禁用虚拟主机的跟踪

选项

  • false ← (默认)

  • true

示例

- name: Ensure that the vhost /test exists.
  community.rabbitmq.rabbitmq_vhost:
    name: /test
    state: present

作者

  • Chris Hoffman (@chrishoffman)