redhat-cop / infra-ansible

Tooling / Ansible to support the many aspects of infrastructure installation, setup and configuration.
Apache License 2.0
214 stars 120 forks source link

Fixing list_of_mail_to list generation #680

Closed makirill closed 1 year ago

makirill commented 1 year ago

What does this PR do?

The list_of_mail_to list (which is used for the SMTP TO: field) is generated as follow, so SMTP servers which are strictly follows RFC returning errors.

"to": "[] + [ 'name@domain.com' ]",

This PR updating list_of_mail_to generation, so the final result looks like:

"to": [
     "name@domain.com",
     "first.last@domain.com"
  ]

How should this be tested?

This PR was tested by sending emails using the email-notify-list-of-users.yml playbook.

People to notify

cc: @redhat-cop/infra-ansible