telekom_mms.icinga_director.icinga_deploy 模块 – 在 Icinga2 中触发部署

注意

此模块是 telekom_mms.icinga_director 集合(版本 2.2.1)的一部分。

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

要安装它,请使用: ansible-galaxy collection install telekom_mms.icinga_director

要在 playbook 中使用它,请指定:telekom_mms.icinga_director.icinga_deploy

telekom_mms.icinga_director 1.33.0 中的新增功能

概要

  • 通过 director API 触发到 Icinga2 的部署。

参数

参数

注释

client_cert

路径

用于 SSL 客户端身份验证的 PEM 格式证书链文件。

此文件也可以包含密钥,如果包含密钥,则不需要 client_key

client_key

路径

包含用于 SSL 客户端身份验证的私钥的 PEM 格式文件。

如果 client_cert 同时包含证书和密钥,则不需要此选项。

force

布尔值

如果 yes,则不要获取缓存副本。

选择

  • false ← (默认)

  • true

force_basic_auth

布尔值

使用 url_usernameurl_password 指定的凭据应在 HTTP 标头中传递。

选择

  • false ← (默认)

  • true

http_agent

字符串

要标识的标头,通常出现在 Web 服务器日志中。

默认: "ansible-httpget"

timeout

整数

等待部署完成的默认超时时间(以秒为单位)。

默认: 2

url

字符串 / 必需

形式为 (http|https|ftp)://[user[:pass]]@host.domain[:port]/path 的 HTTP、HTTPS 或 FTP URL

url_password

字符串

用于 HTTP 基本身份验证的密码。

如果未指定 url_username 参数,则不会使用 url_password 参数。

url_username

字符串

用于 HTTP 基本身份验证的用户名。

此参数可以在没有 url_password 的情况下用于允许空密码的站点。

use_gssapi

布尔值

在 ansible-core 2.11 中添加

使用 GSSAPI 执行身份验证,通常用于 Kerberos 或通过协商身份验证的 Kerberos。

需要安装 Python 库 gssapi

可以使用 url_username/url_password 或指定自定义 Kerberos 凭据缓存的 GSSAPI 环境变量 KRB5CCNAME 来指定 GSSAPI 的凭据。

即使已安装 NTLM 的 GSSAPI 机制,也支持 NTLM 身份验证。

选择

  • false ← (默认)

  • true

use_proxy

布尔值

如果 no,即使在目标主机上的环境变量中定义了代理,也不会使用代理。

选择

  • false

  • true ← (默认)

validate_certs

布尔值

如果 no,将不会验证 SSL 证书。

这仅应在个人控制的使用自签名证书的站点上使用。

选择

  • false

  • true ← (默认)

示例

- name: Deploy the icinga config
  telekom_mms.icinga_director.icinga_deploy:
    url: "{{ icinga_url }}"
    url_username: "{{ icinga_user }}"
    url_password: "{{ icinga_pass }}"
    timeout: 5

返回值

通用返回值在此处记录 此处,以下是此模块特有的字段

描述

checksum

字符串

应推出的配置的校验和

返回:始终

示例: "{'checksum': '294bdfb53c4da471e37317beed549a953c939424'}"

作者

  • Falk Händler (@flkhndlr)