ieisystem.inmanage.edit_smtp_dest 模块 – 设置 SMTP 信息

注意

此模块是 ieisystem.inmanage 集合(版本 3.0.0)的一部分。

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

要安装它,请使用:ansible-galaxy collection install ieisystem.inmanage。您需要进一步的要求才能使用此模块,请参阅 要求 以了解详细信息。

要在 playbook 中使用它,请指定:ieisystem.inmanage.edit_smtp_dest

ieisystem.inmanage 1.0.0 中的新功能

概要

  • 在 ieisystem 服务器上设置 SMTP 目标信息。

  • 只有 M6 型号支持此功能。

要求

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

  • Python 3.7+

  • inManage

参数

参数

注释

address

字符串

电子邮件地址。

description

字符串

描述信息。

host

字符串

指定用于通过指定的传输连接到远程设备的 DNS 主机名或地址。主机的值用作传输的目标地址。

id

整数 / 必需

电子邮件目标 id。

选项

  • 1

  • 2

  • 3

  • 4

password

字符串

指定用于验证与远程设备连接的密码。如果任务中未指定该值,则将使用环境变量 ANSIBLE_NET_PASSWORD 的值。

provider

字典

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

host

字符串

指定用于通过指定的传输连接到远程设备的 DNS 主机名或地址。主机的值用作传输的目标地址。

password

字符串

指定用于验证与远程设备连接的密码。如果任务中未指定该值,则将使用环境变量 ANSIBLE_NET_PASSWORD 的值。

username

字符串

配置用于验证与远程设备连接的用户名。如果任务中未指定该值,则将使用环境变量 ANSIBLE_NET_USERNAME 的值。

status

字符串

启用电子邮件。

选项

  • "enable"

  • "disable"

username

字符串

配置用于验证与远程设备连接的用户名。如果任务中未指定该值,则将使用环境变量 ANSIBLE_NET_USERNAME 的值。

注意事项

注意

  • 不支持 check_mode

示例

- name: Smtp  dest test
  hosts: inmanage
  connection: local
  gather_facts: false
  vars:
    inmanage:
      host: "{{ ansible_ssh_host }}"
      username: "{{ username }}"
      password: "{{ password }}"

  tasks:

  - name: "Set smtp dest information"
    ieisystem.inmanage.edit_smtp_dest:
      id: 1
      status: "disable"
      provider: "{{ inmanage }}"

  - name: "Set smtp dest information"
    ieisystem.inmanage.edit_smtp_dest:
      id: 1
      status: "enable"
      address: "100.2.2.2"
      description": "test"
      provider: "{{ inmanage }}"

返回值

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

描述

changed

布尔值

检查设备上是否进行了更改。

返回: 总是

message

字符串

模块执行后返回的消息。

返回: 总是

state

字符串

模块执行后的状态。

返回: 总是

作者

  • WangBaoshan (@ieisystem)