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

11 lines
332 B
YAML
Raw Normal View History

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