vn-ansible/roles/send-mail/tasks/main.yml

11 lines
332 B
YAML
Raw Permalink Normal View History

2024-10-16 15:53:15 +00:00
- name: Send mail using own SMTP server
community.general.mail:
host: "{{ smtp_server }}"
port: 465
username: "{{ awx_email }}"
password: "{{ awx_smtp_password }}"
to: "{{ sysadmin_mail }}"
subject: Ansible test
body: System {{ ansible_fqdn }} has sent the email successfully.
delegate_to: localhost