yadro.tatlin_uni.tatlin_sp_smtp module – Configure SP SMTP settings

Note

This module is part of the yadro.tatlin_uni collection (version 1.0.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install yadro.tatlin_uni.

To use it in a playbook, specify: yadro.tatlin_uni.tatlin_sp_smtp.

New in version 1.0.0: of yadro.tatlin_uni

Synopsis

  • This module is intended to configure sending email parameters via SMTP protocol

  • Supports check mode

Parameters

Parameter

Comments

address

string

SMTP server`s address

connection

dictionary / required

connection describes Tatlin Storage Processor (SP) connection configuration.

Only session connection supported.

Authorization is executed automatically with corresponding endpoint. ‘auth/login’ by default.

Client receives x-auth-token and uses it for following requests.

base_url

string / required

Tatlin REST API entrypoint.

password

string

Tatlin user password.

timeout

integer

Tatlin REST API request timeout.

Default: 60

username

string

Tatlin username to login.

validate_certs

boolean

Responsible for SSL certificates validation.

If set to False certificates won’t validated.

Choices:

  • no

  • yes ← (default)

encryption

string

Encryption type

Choices:

  • tls

  • off

login

string

User’s name

password

string

User’s password

port

integer

SMTP server`s port

recipients

list / elements=string

List of emails, messages receivers

sender

string

An email, which will be used as sender for sent messages

state

string

present sets passed SMTP configuration

absent deletes passed SMTP servers in recipients

If no recipients were passed with absent, all configuration will be removed

Choices:

  • present ← (default)

  • absent

Examples

---
- name: Set SMTP config
  yadro.tatlin_uni.tatlin_sp_smtp:
    connection: "{{ connection }}"
    address: 127.0.0.1
    port: 25
    login: user
    password: userpass
    sender: smtp@example.com
    state: present
    recipients:
      - first@recipient.com
      - second@recipient.com

- name: Add recipients
  yadro.tatlin_uni.tatlin_sp_smtp:
    connection: "{{ connection }}"
    recipients:
      - first@recipient.com
      - second@recipient.com
      - third@recipient.com

- name: Remove recipient
  yadro.tatlin_uni.tatlin_sp_smtp:
    connection: "{{ connection }}"
    recipients:
      - second@recipient.com
    state: absent

- name: Clear config
  yadro.tatlin_uni.tatlin_sp_smtp:
    connection: "{{ connection }}"
    state: absent

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

error

string

Error details if raised

Returned: on error

msg

string

Operation status message

Returned: always

Authors

  • Sergey Kovalev (@kvlvs)