Failed module mail

“The module mail was redirected to community.general.notification.mail, which could not be loaded.”

code:

  • name: Mail
    mail:
    host: server.com
    port: XXX
    username: XXXXXXXX
    password: XXXXXXXXXX
    body: ‘Change 1205 is live.’

I install requirements.yml
Example:
requirements.yml

collections:

Install ansible.posix Ansible Collection

  • name: community.windows

source: https://galaxy.ansible.com

  • name: community.general

source: https://galaxy.ansible.com

  • name: ansible.windows

source: https://galaxy.ansible.com

where did you place that requirements file? should be in the collections/requirements.yml

Does your playbook work outside of AWX (i.e. just running ansible in a terminal)

AWX Team

Yes,
Captura.PNG

it’s solved! =)

I add:

  • name: Mail
    mail:
    host: server.com
    port: XXX
    username: XXXXXXXX
    password: XXXXXXXXXX
    body: 'Change 1205 is live.

delegate_to: localhost

it works fine

https://github.com/ansible-collections/community.general/issues/4943