refs #8025 send-mail made generic

This commit is contained in:
Juan Ferrer 2024-09-24 12:27:24 +02:00
parent 4f20789f61
commit c8b0d9fb1c
10 changed files with 49 additions and 49 deletions

View File

@ -7,6 +7,7 @@ resolv:
resolvers:
- '10.0.0.4'
- '10.0.0.5'
awx_email: awx@verdnatura.es
awx_pub_key: >
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDjeIZVyppFK/dqOUa1PxgSeRVWk7MFmANYvSs+VHHn
D4/BE//K8AxlxnyLl4e6jAcBFoIu1JLxbRKdOhx+Zgkq5OmEzp/XKzfEvnEU5CP+W2+5MwfkUQ3TetJs

View File

@ -1,7 +1,6 @@
- hosts: localhost
become: no
become_method: sudo
tasks:
- name: Send mail
import_role:
name: config-send-mail
name: send-mail

View File

@ -1,10 +1,10 @@
- name: Send mail using Verdnatura SMTP servers
- name: Send mail using own SMTP server
community.general.mail:
host: smtp.verdnatura.es
host: "{{ smtp_server }}"
port: 465
username: awx@verdnatura.es
username: "{{ awx_email }}"
password: "{{ awx_smtp_password }}"
to: "{{ sysadmin_mail }}"
subject: Ansible-test
body: System {{ ansible_hostname }} has been send successfully mail.
subject: Ansible test
body: System {{ ansible_fqdn }} has sent the email successfully.
delegate_to: localhost