update mail

This commit is contained in:
Ruben Blanco 2023-10-17 10:59:24 +02:00
parent 97bcef6e50
commit a4b9981127
1 changed files with 12 additions and 1 deletions

View File

@ -145,8 +145,19 @@
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Send mail to verify relay-host # Send mail to verify relay-host
# Create file with message
- name: create file and add line
lineinfile:
path: /tmp/messagefileverify
line: Verify send email from host {{ ansible_nodename }}'.verdnatura.es with mailx , bye.
# Send mail
- name: sending mail to verify exim4 config works - name: sending mail to verify exim4 config works
command: echo Verify email , bye. | mailx -s "test mail verify exim4 for the host '{{ dc_other_hostnames }}'.verdnatura.es" -c rubenb@verdnatura.es,nada@verdnatura.es,davidl@verdnatura.es,juan@verdnatura.es informatica@verdnatura.es command: mailx -s "test mail verify exim4 for the host '{{ ansible_nodename }}'.verdnatura.es" -c rubenb@verdnatura.es,nada@verdnatura.es,davidl@verdnatura.es,juan@verdnatura.es informatica@verdnatura.es < /tmp/messagefileverify
# Delete tmp file /tmp/messagefileverify
- name: delete tmp file /tmp/messagefileverify
file:
path: /tmp/messagefileverify
state: absent
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++