hitachivantara.vspone_block.sds_block.hv_sds_block_event_log_setting module – Manages Hitachi SDS block storage system event log settings.

Note

This module is part of the hitachivantara.vspone_block collection (version 4.6.1).

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 hitachivantara.vspone_block. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: hitachivantara.vspone_block.sds_block.hv_sds_block_event_log_setting.

New in hitachivantara.vspone_block 4.6.0

Synopsis

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 3.9

Parameters

Parameter

Comments

connection_info

dictionary / required

Information required to establish a connection to the storage system.

address

string / required

IP address or hostname of the storage system.

connection_type

string

Type of connection to the storage system.

Choices:

  • "direct" ← (default)

password

string / required

Password for authentication. This is a required field.

username

string / required

Username for authentication. This is a required field.

spec

dictionary

Specification for the event log settings task.

email_report_setting

dictionary

Email report configuration.

smtp_settings

list / elements=dictionary

List of SMTP server settings.

connection_encryption_type

string

Connection encryption type for SMTP.

Choices:

  • "None"

  • "STARTTLS"

  • "SSL/TLS"

from_address

string

Email from address.

index

integer / required

Index of the SMTP server.

Choices:

  • 1

  • 2

is_enabled

boolean

Whether the SMTP server is enabled.

Choices:

  • false

  • true

is_smtp_auth_enabled

boolean

Whether SMTP authentication is enabled.

Choices:

  • false

  • true

port

integer

SMTP server port number.

smtp_auth_account

string

SMTP authentication account.

smtp_auth_password

string

SMTP authentication password.

smtp_server_name

string

SMTP server name or IP address.

to_address1

string

Primary email recipient address.

to_address2

string

Secondary email recipient address.

to_address3

string

Tertiary email recipient address.

smtp_root_certificate

dictionary

SMTP server root certificate configuration. This is a required field when the state field is import_smtp_certificate or download_smtp_certificate.

certificate_path

string

Absolute path to the certificate file to import. Required when state is import_smtp_certificate.

download_location

string

Directory path where the certificate will be downloaded. Required when state is download_smtp_certificate.

target_smtp_server

integer

Index of the SMTP server for which to import/download the certificate.

Choices:

  • 1 ← (default)

  • 2

syslog_forwarding_setting

dictionary

Syslog forwarding configuration.

location_name

string

Location name for syslog forwarding.

syslog_servers

list / elements=dictionary

List of syslog servers configuration.

index

integer / required

Index of the syslog server.

Choices:

  • 1

  • 2

is_enabled

boolean

Whether the syslog server is enabled.

Choices:

  • false

  • true ← (default)

port

integer

Syslog server port number.

Default: 514

server_name

string / required

Syslog server name or IP address.

transport_protocol

string

Transport protocol for syslog server.

Choices:

  • "UDP" ← (default)

state

string

The level of the event log settings task. Choices are present, import_smtp_certificate, and download_smtp_certificate.

Choices:

  • "present" ← (default)

  • "import_smtp_certificate"

  • "download_smtp_certificate"

Attributes

Attribute

Support

Description

check_mode

Support: none

Determines if the module should run in check mode.

Examples

- name: Configure event log settings with syslog forwarding
  hitachivantara.vspone_block.sds_block.hv_sds_block_event_log_setting:
    state: present
    connection_info:
      address: sdsb.company.com
      username: "admin"
      password: "password"
    spec:
      syslog_forwarding_setting:
        location_name: "datacenter1"
        syslog_servers:
          - index: 1
            is_enabled: true
            server_name: "syslog.example.com"
            port: 514
            transport_protocol: "UDP"
          - index: 2
            is_enabled: false
            server_name: "backup-syslog.example.com"
            port: 514
            transport_protocol: "UDP"

- name: Configure event log settings with email reporting
  hitachivantara.vspone_block.sds_block.hv_sds_block_event_log_setting:
    state: present
    connection_info:
      address: sdsb.company.com
      username: "admin"
      password: "password"
    spec:
      email_report_setting:
        smtp_settings:
          - index: 1
            is_enabled: true
            smtp_server_name: "smtp.example.com"
            port: 587
            connection_encryption_type: "STARTTLS"
            is_smtp_auth_enabled: true
            smtp_auth_account: "eventlog@example.com"
            smtp_auth_password: "secure_password"
            from_address: "storage-alerts@example.com"
            to_address1: "admin@example.com"
            to_address2: "team@example.com"
            to_address3: ""

- name: Update syslog server configuration
  hitachivantara.vspone_block.sds_block.hv_sds_block_event_log_setting:
    state: present
    connection_info:
      address: sdsb.company.com
      username: "admin"
      password: "password"
    spec:
      syslog_forwarding_setting:
        location_name: "datacenter1"
        syslog_servers:
          - index: 1
            is_enabled: true
            server_name: "new-syslog.example.com"
            port: 1514
            transport_protocol: "UDP"

- name: Import SMTP root certificate for SMTP server 1
  hitachivantara.vspone_block.sds_block.hv_sds_block_event_log_setting:
    state: import_smtp_certificate
    connection_info:
      address: sdsb.company.com
      username: "admin"
      password: "password"
    spec:
      smtp_root_certificate:
        certificate_path: "/etc/ssl/certs/smtp_root_ca.pem"
        target_smtp_server: 1

- name: Import SMTP root certificate for SMTP server 2
  hitachivantara.vspone_block.sds_block.hv_sds_block_event_log_setting:
    state: import_smtp_certificate
    connection_info:
      address: sdsb.company.com
      username: "admin"
      password: "password"
    spec:
      smtp_root_certificate:
        certificate_path: "/etc/ssl/certs/smtp_root_ca.pem"
        target_smtp_server: 2

- name: Download SMTP root certificate from server 1
  hitachivantara.vspone_block.sds_block.hv_sds_block_event_log_setting:
    state: download_smtp_certificate
    connection_info:
      address: sdsb.company.com
      username: "admin"
      password: "password"
    spec:
      smtp_root_certificate:
        download_location: "/tmp/certificates"
        # target_smtp_server: 1  # Optional - defaults to 1

- name: Download SMTP root certificate from server 2
  hitachivantara.vspone_block.sds_block.hv_sds_block_event_log_setting:
    state: download_smtp_certificate
    connection_info:
      address: sdsb.company.com
      username: "admin"
      password: "password"
    spec:
      smtp_root_certificate:
        download_location: "/tmp/certificates"
        target_smtp_server: 2

Return Values

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

Key

Description

event_log_settings

dictionary

Dictionary containing the configured event log settings.

Returned: always

emailReportSetting

dictionary

Email report configuration details.

Returned: success

smtpSettings

list / elements=dictionary

List of configured SMTP servers.

Returned: success

connectionEncryptionType

string

Connection encryption type.

Returned: success

Sample: "STARTTLS"

fromAddress

string

Email from address.

Returned: success

Sample: "storage-alerts@example.com"

index

integer

Index of the SMTP server.

Returned: success

Sample: 1

isEnabled

boolean

Whether the SMTP server is enabled.

Returned: success

Sample: true

isSmtpAuthEnabled

boolean

Whether SMTP authentication is enabled.

Returned: success

Sample: true

port

integer

SMTP server port number.

Returned: success

Sample: 587

smtpAuthAccount

string

SMTP authentication account.

Returned: success

Sample: "eventlog@example.com"

smtpServerName

string

SMTP server name or IP address.

Returned: success

Sample: "smtp.example.com"

toAddress1

string

Primary recipient address.

Returned: success

Sample: "admin@example.com"

toAddress2

string

Secondary recipient address.

Returned: success

Sample: "team@example.com"

toAddress3

string

Tertiary recipient address.

Returned: success

Sample: ""

syslogForwardingSetting

dictionary

Syslog forwarding configuration details.

Returned: success

locationName

string

Location name for syslog forwarding.

Returned: success

Sample: "datacenter1"

syslogServers

list / elements=dictionary

List of configured syslog servers.

Returned: success

index

integer

Index of the syslog server.

Returned: success

Sample: 1

isEnabled

boolean

Whether the syslog server is enabled.

Returned: success

Sample: true

port

integer

Syslog server port number.

Returned: success

Sample: 514

serverName

string

Syslog server name or IP address.

Returned: success

Sample: "syslog.example.com"

transportProtocol

string

Transport protocol for syslog server.

Returned: success

Sample: "UDP"

Authors

  • Hitachi Vantara LTD (@hitachi-vantara)