I am trying to send one email to team after job is successfully completed. Issue is playbook sending (if inventory have 100 servers ). It is sending 100 emails.
I tried in my code: delegate_to: localhost and run_once: true it doesn’t help please provide your inputs it really helpful .
I am trying to send one email to team after job is successfully completed. Issue is playbook sending (if inventory have 100 servers ). It is sending 100 emails.
I tried in my code: delegate_to: localhost and run_once: true it doesn't help please provide your inputs it really helpful .
- name: Sending email to about SSL scan
mail:
host: xxxxx
port: 25
subject: xxxx
body: xxxx
from: xxx
to:
# - xxxx
- xxxx
delegate_to: localhost
run_once: true
The mail module apparently doesn't check its parameters. For example "from" is going to be ignored, as the correct parameter is "sender". Please double check your indentation. "run_once" should be working.