Thanks Brian for the reply,
I will try the same and get back to you.
On Tue, Mar 23, 2021 at 9:26 PM Brian Coca wrote:
> You can modify the mail task to send per group:
>
> - name: send mail to chetan
> mail:
> host: relay.services
> port: 25
>
You can modify the mail task to send per group:
- name: send mail to chetan
mail:
host: relay.services
port: 25
from: ad...@company.com
to: "{{web_email}}"
subject: uptime for {{item}}
body: |-
Hi I am struck with looping for below requirement.
The mail section has to loop over first group in inventory, check the
uptime with the condition of more than 200 days and send mail to only the
lab_email with lab servers only
Next go to 2nd web group check condition and send mail to web_ema