ieisystem.inmanage.edit_smtp (1.1.1) — module

Set SMTP information

| "added in version" 1.0.0 of ieisystem.inmanage"

Authors: WangBaoshan (@ieisystem)

Install collection

Install with ansible-galaxy collection install ieisystem.inmanage:==1.1.1


Add to requirements.yml

  collections:
    - name: ieisystem.inmanage
      version: 1.1.1

Description

Set SMTP information on ieisystem Server.

Only the M5 models support this feature.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Smtp test
  hosts: inmanage
  no_log: true
  connection: local
  gather_facts: no
  vars:
    inmanage:
      host: "{{ ansible_ssh_host }}"
      username: "{{ username }}"
      password: "{{ password }}"

  tasks:

  - name: "Set smtp information"
    ieisystem.inmanage.edit_smtp:
      interface: "eth0"
      email: "ieit@ieisystem.com"
      primary_status: "enable"
      primary_ip: "100.2.2.2"
      primary_name: "test"
      primary_auth: "disable"
      provider: "{{ inmanage }}"

  - name: "Set smtp information"
    ieisystem.inmanage.edit_smtp:
      interface: "eth0"
      email: "ieit@ieisystem.com"
      primary_status: "enable"
      primary_ip: "100.2.2.2"
      primary_name: "test"
      primary_auth: "enable"
      primary_username: "test"
      primary_password: my_password
      provider: "{{ inmanage }}"

Inputs

    
host:
    description:
    - Specifies the DNS host name or address for connecting to the remote device over
      the specified transport.  The value of host is used as the destination address for
      the transport.
    type: str

email:
    description:
    - Sender email.
    type: str

password:
    description:
    - Specifies the password to use to authenticate the connection to the remote device.
      If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_PASSWORD)
      will be used instead.
    type: str

provider:
    description:
    - A dict object containing connection details.
    suboptions:
      host:
        description:
        - Specifies the DNS host name or address for connecting to the remote device over
          the specified transport.  The value of host is used as the destination address
          for the transport.
        type: str
      password:
        description:
        - Specifies the password to use to authenticate the connection to the remote device.
          If the value is not specified in the task, the value of environment variable
          C(ANSIBLE_NET_PASSWORD) will be used instead.
        type: str
      username:
        description:
        - Configures the username to use to authenticate the connection to the remote
          device. If the value is not specified in the task, the value of environment
          variable C(ANSIBLE_NET_USERNAME) will be used instead.
        type: str
    type: dict

username:
    description:
    - Configures the username to use to authenticate the connection to the remote device.
      If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_USERNAME)
      will be used instead.
    type: str

interface:
    choices:
    - eth0
    - eth1
    - bond0
    description:
    - LAN Channel, eth0 is shared, eth1 is dedicated.
    required: true
    type: str

primary_ip:
    description:
    - Primary SMTP server IP.
    type: str

primary_auth:
    choices:
    - enable
    - disable
    description:
    - Primary SMTP server authentication.
    type: str

primary_name:
    description:
    - Primary SMTP server name.
    type: str

primary_port:
    description:
    - Primary SMTP server port, The Identification for retry count configuration(1-65535).
    type: int

secondary_ip:
    description:
    - Secondary SMTP server IP.
    type: str

primary_status:
    choices:
    - enable
    - disable
    description:
    - Primary SMTP Support.
    type: str

secondary_auth:
    choices:
    - enable
    - disable
    description:
    - Secondary SMTP server authentication.
    type: str

secondary_name:
    description:
    - Secondary SMTP server name.
    type: str

secondary_port:
    description:
    - Secondary SMTP server port, The Identification for retry count configuration(1-65535).
    type: int

primary_password:
    description:
    - Primary SMTP server Password, length be 4 to 64 bits, cannot contain ' '(space).
    - Required when I(primary_auth=enable).
    type: str

primary_username:
    description:
    - Primary SMTP server Username, length be 4 to 64 bits.
    - Must start with letters and cannot contain ', '(comma) ':'(colon) ' '(space) ';'(semicolon)
      '\'(backslash).
    type: str

secondary_status:
    choices:
    - enable
    - disable
    description:
    - Secondary SMTP Support.
    type: str

secondary_password:
    description:
    - Secondary SMTP server Password, length be 4 to 64 bits, cannot contain ' '(space).
    - Required when I(secondary_auth=enable).
    type: str

secondary_username:
    description:
    - Secondary SMTP server Username, length be 4 to 64 bits.
    - Must start with letters and cannot contain ','(comma) ':'(colon) ' '(space) ';'(semicolon)
      '\'(backslash).
    type: str

Outputs

changed:
  description: Check to see if a change was made on the device.
  returned: always
  type: bool
message:
  description: Messages returned after module execution.
  returned: always
  type: str
state:
  description: Status after module execution.
  returned: always
  type: str