f5networks.f5_modules.bigip_smtp (1.28.0) — module

Manages SMTP settings on the BIG-IP

| "added in version" 1.0.0 of f5networks.f5_modules"

Authors: Tim Rupp (@caphrim007)

Install collection

Install with ansible-galaxy collection install f5networks.f5_modules:==1.28.0


Add to requirements.yml

  collections:
    - name: f5networks.f5_modules
      version: 1.28.0

Description

Allows configuring of the BIG-IP to send mail via an SMTP server by configuring the parameters of an SMTP server.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a base SMTP server configuration
  bigip_smtp:
    name: my-smtp
    smtp_server: 1.1.1.1
    smtp_server_username: mail-admin
    smtp_server_password: mail-secret
    local_host_name: smtp.mydomain.com
    from_address: no-reply@mydomain.com
    state: present
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost

Inputs

    
name:
    description:
    - Specifies the name of the SMTP server configuration.
    required: true
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - When C(present), ensures the SMTP configuration exists.
    - When C(absent), ensures the SMTP configuration does not exist.
    type: str

provider:
    description:
    - A dict object containing connection details.
    suboptions:
      auth_provider:
        description:
        - Configures the auth provider for to obtain authentication tokens from the remote
          device.
        - This option is really used when working with BIG-IQ devices.
        type: str
      no_f5_teem:
        default: false
        description:
        - If C(yes), TEEM telemetry data is not sent to F5.
        - You may omit this option by setting the environment variable C(F5_TELEMETRY_OFF).
        - Previously used variable C(F5_TEEM) is deprecated as its name was confusing.
        type: bool
      password:
        aliases:
        - pass
        - pwd
        description:
        - The password for the user account used to connect to the BIG-IP or the BIG-IQ.
        - You may omit this option by setting the environment variable C(F5_PASSWORD).
        required: true
        type: str
      server:
        description:
        - The BIG-IP host or the BIG-IQ host.
        - You may omit this option by setting the environment variable C(F5_SERVER).
        required: true
        type: str
      server_port:
        default: 443
        description:
        - The BIG-IP server port.
        - You may omit this option by setting the environment variable C(F5_SERVER_PORT).
        type: int
      timeout:
        description:
        - Specifies the timeout in seconds for communicating with the network device for
          either connecting or sending commands.  If the timeout is exceeded before the
          operation is completed, the module will error.
        type: int
      transport:
        choices:
        - rest
        default: rest
        description:
        - Configures the transport connection to use when connecting to the remote device.
        type: str
      user:
        description:
        - The username to connect to the BIG-IP or the BIG-IQ. This user must have administrative
          privileges on the device.
        - You may omit this option by setting the environment variable C(F5_USER).
        required: true
        type: str
      validate_certs:
        default: true
        description:
        - If C(no), SSL certificates are not validated. Use this only on personally controlled
          sites using self-signed certificates.
        - You may omit this option by setting the environment variable C(F5_VALIDATE_CERTS).
        type: bool
    type: dict
    version_added: 1.0.0
    version_added_collection: f5networks.f5_modules

partition:
    default: Common
    description:
    - Device partition to manage resources on.
    type: str

encryption:
    choices:
    - none
    - ssl
    - tls
    description:
    - Specifies whether the SMTP server requires an encrypted connection in order to send
      mail.
    type: str

smtp_server:
    description:
    - SMTP server host name in the format of a fully qualified domain name.
    - This value is required when creating a new SMTP configuration.
    type: str

from_address:
    description:
    - Email address from which the email is being sent. This is the "Reply-to" address
      the recipient sees.
    type: str

authentication:
    description:
    - Credentials can be set on an SMTP server's configuration even if that authentication
      is not used (for example, staging configs or emergency changes). This parameter
      acts as a switch to make the specified C(smtp_server_username) and C(smtp_server_password)
      parameters active or not.
    - When C(true), the authentication parameters are active.
    - When C(false), the authentication parameters are inactive.
    type: bool

local_host_name:
    description:
    - Hostname used in SMTP headers in the format of a fully qualified domain name. This
      setting does not refer to the hostname of the BIG-IP system.
    type: str

update_password:
    choices:
    - always
    - on_create
    default: always
    description:
    - Passwords are stored encrypted, so the module cannot know if the supplied C(smtp_server_password)
      is the same or different than the existing password. This parameter controls the
      updating of the C(smtp_server_password) credential.
    - When C(always), the system always updates the password.
    - When C(on_create), the system only sets the password for newly created SMTP server
      configurations.
    type: str

smtp_server_port:
    description:
    - Specifies the SMTP port number.
    - When creating a new SMTP configuration, the default is C(25) when C(encryption)
      is C(none) or C(tls). The default is C(465) when C(ssl) is selected.
    type: int

smtp_server_password:
    description:
    - Password the SMTP server requires when validating a user.
    type: str

smtp_server_username:
    description:
    - User name the SMTP server requires when validating a user.
    type: str

Outputs

authentication:
  description: Whether the authentication parameters are active or not.
  returned: changed
  sample: true
  type: bool
encryption:
  description: The new C(encryption) value of the SMTP configuration.
  returned: changed
  sample: tls
  type: str
from_address:
  description: The new C(from_address) value of the SMTP configuration.
  returned: changed
  sample: no-reply@mydomain.com
  type: str
local_host_name:
  description: The new C(local_host_name) value of the SMTP configuration.
  returned: changed
  sample: smtp.mydomain.com
  type: str
smtp_server:
  description: The new C(smtp_server) value of the SMTP configuration.
  returned: changed
  sample: mail.mydomain.com
  type: str
smtp_server_port:
  description: The new C(smtp_server_port) value of the SMTP configuration.
  returned: changed
  sample: 25
  type: int