Re: [ansible-project] how to loop inventory groups in ansible

2021-03-25 Thread Chetan Kumar Sriram
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 >

Re: [ansible-project] how to loop inventory groups in ansible

2021-03-23 Thread Brian Coca
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: |-

[ansible-project] how to loop inventory groups in ansible

2021-03-20 Thread Chetan Kumar Sriram
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