Ansible trigering Python Code to Merge CSV's into Excel

is it possible to run python code (from ansible) to combine two csv files (generated by ansible) in to excel sheet and make ansible to send that excel file via email

Yes. Or at least I don’t see why this would NOT be possible.

Yes. Ansible has a shell module and a command module. Both can be used to run any command including a python script. Read about them both in ansible documentation to make sure you understand their differences.

Walter

And if you are really game one can develop their own modules using Python. They have their own helper functions to do this to make it feel and look like a native task