update mail

This commit is contained in:
Ruben Blanco 2023-10-17 11:08:29 +02:00
parent fd0360506f
commit ad52224241
1 changed files with 10 additions and 10 deletions

View File

@ -146,19 +146,19 @@
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Send mail to verify relay-host # Send mail to verify relay-host
# Create file with message # Create file with message
- name: create file and add line #- name: create file and add line
lineinfile: # lineinfile:
path: /tmp/messagefileverify # path: /tmp/messagefileverify
line: Verify send email from host {{ ansible_nodename }}'.verdnatura.es with mailx , bye. # line: Verify send email from host {{ ansible_nodename }}'.verdnatura.es with mailx , bye.
create: yes # create: yes
# Send mail # Send mail
- name: sending mail to verify exim4 config works - name: sending mail to verify exim4 config works
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 command: echo "Verify send email from host {{ ansible_nodename }}'.verdnatura.es with mailx , bye." | mailx -s "test mail verify exim4 for the host '{{ ansible_nodename }}'.verdnatura.es" informatica@verdnatura.es
# Delete tmp file /tmp/messagefileverify # Delete tmp file /tmp/messagefileverify
- name: delete tmp file /tmp/messagefileverify #- name: delete tmp file /tmp/messagefileverify
file: # file:
path: /tmp/messagefileverify # path: /tmp/messagefileverify
state: absent # state: absent
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++