Hello Experts
bellow query to automate Windows server using ansible :
In my opinion, this is not something you would build using Ansible. You would only use Ansible to deploy the solution.
Hi @jijojoy ,
Thanks for reaching out !
You need three modules to work on this :
1. win_shell : https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_shell_module.html to run a command / powershell command to get the desired output.
2. Format your output using "template" module or use this filter to convert the stdout to a table {{abc.stdout | table }}
3, use mail module to send a mail with that table attachment : https://docs.ansible.com/ansible/latest/collections/community/general/mail_module.html
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.