infoblox.nios_modules.nios_dtc_monitor_icmp 模块 – 配置 Infoblox NIOS DTC ICMP 监视器

注意

此模块是 infoblox.nios_modules 集合(版本 1.7.1)的一部分。

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

要安装它,请使用:ansible-galaxy collection install infoblox.nios_modules。您需要进一步的要求才能使用此模块,有关详细信息,请参阅 要求

要在 playbook 中使用它,请指定:infoblox.nios_modules.nios_dtc_monitor_icmp

infoblox.nios_modules 1.6.0 中的新增功能

概要

  • 从 Infoblox NIOS 服务器添加和/或删除 DTC ICMP 监视器对象的实例。此模块使用基于 REST 的 Infoblox WAPI 接口管理 dtc:monitor:icmp 对象。

要求

执行此模块的主机需要满足以下要求。

  • infoblox-client

参数

参数

注释

comment

string

配置与此对象实例关联的文本字符串注释。提供的文本字符串将在对象实例上配置。

extattrs

dictionary

允许在对象实例上配置可扩展属性。此参数接受一组用于配置的键/值对。

interval

integer

配置 ICMP 健康检查的间隔。

默认值: 5

name

string / required

配置此 DTC 监视器的显示名称。对于此字段,带有前导或尾随空格的值无效。

provider

dictionary

包含连接详细信息的字典对象。

cert

string

指定客户端证书文件,其中包含 x509 配置的摘要,以实现与 NIOS 远程实例的额外安全连接层。

也可以使用 INFOBLOX_CERT 环境变量指定值。

host

string

指定 DNS 主机名或地址,用于通过 REST 连接到 NIOS WAPI 的远程实例

也可以使用 INFOBLOX_HOST 环境变量指定值。

http_pool_connections

integer

在此处插入描述

默认值: 10

http_pool_maxsize

integer

在此处插入描述

默认值: 10

http_request_timeout

integer

在收到响应之前等待的时间量

也可以使用 INFOBLOX_HTTP_REQUEST_TIMEOUT 环境变量指定值。

默认值: 10

key

string

指定用于加密的私钥文件,以便与证书一起连接到 NIOS 的远程实例。

也可以使用 INFOBLOX_KEY 环境变量指定值。

max_results

integer

指定要返回的最大对象数,如果设置为负数,则当返回的对象数超过设置时,设备将返回错误。

也可以使用 INFOBLOX_MAX_RESULTS 环境变量指定值。

默认值: 1000

max_retries

integer

配置在声明连接可用之前尝试的重试次数

也可以使用 INFOBLOX_MAX_RETRIES 环境变量指定值。

默认值: 3

password

string

指定用于验证与 NIOS 远程实例的连接的密码。

也可以使用 INFOBLOX_PASSWORD 环境变量指定值。

silent_ssl_warnings

boolean

在此处插入描述

选项

  • false

  • true ← (默认)

username

string

配置用于验证与 NIOS 远程实例的连接的用户名。

也可以使用 INFOBLOX_USERNAME 环境变量指定值。

validate_certs

别名: ssl_verify

boolean

启用或禁用验证 SSL 证书的布尔值

也可以使用 INFOBLOX_SSL_VERIFY 环境变量指定值。

选项

  • false ← (默认)

  • true

wapi_version

string

指定要使用的 WAPI 版本

也可以使用 INFOBLOX_WAPI_VERSION 环境变量指定值。

在 ansible 2.8 之前,默认的 WAPI 是 1.4

默认值: "2.12.3"

retry_down

integer

配置服务器在被视为失效之前,需要连续多少次显示为宕机的次数。

默认值: 1

retry_up

integer

配置服务器在被视为恢复正常之前,需要连续多少次显示为正常的次数。

默认值: 1

state

string

配置 NIOS 服务器上对象实例的预期状态。当此值设置为 present 时,将在设备上配置该对象;当此值设置为 absent 时,将从设备中删除该值(如果需要)。

选项

  • "present" ← (默认)

  • "absent"

timeout

integer

配置 ICMP 健康检查的超时时间,以秒为单位。

默认值: 15

备注

注意

  • 此模块支持 check_mode

  • 此模块必须在本地运行,这可以通过指定 connection: local 来实现。

  • 请阅读 :ref:`nios_guide` 以获取有关如何在 Ansible 中使用 Infoblox 的更详细信息。

示例

- name: Configure a DTC ICMP monitor
  infoblox.nios_modules.nios_dtc_monitor_icmp:
    name: icmp_monitor
    port: 8080
    state: present
    provider:
      host: "{{ inventory_hostname_short }}"
      username: admin
      password: admin
  connection: local

- name: Add a comment to an existing DTC ICMP monitor
  infoblox.nios_modules.nios_dtc_monitor_icmp:
    name: icmp_monitor
    comment: this is a test comment
    state: present
    provider:
      host: "{{ inventory_hostname_short }}"
      username: admin
      password: admin
  connection: local

- name: Remove a DTC ICMP monitor from the system
  infoblox.nios_modules.nios_dtc_monitor_icmp:
    name: icmp_monitor
    state: absent
    provider:
      host: "{{ inventory_hostname_short }}"
      username: admin
      password: admin
  connection: local

作者

  • Joachim Buyse (@jbisabel)