Run once for several hosts: reporting



Many times you would like to extract information from several machines and be able to visualize it in a single view.
For example a table with the version of an antivirus of each machine, the dns it points to or the output of any other command.
Foreman however launches a job for each machine and each one with its output log so it seems unfeasible to generate a table with the results of all the executions.

Is there any way to achieve this?
Maybe via Report Management?

Are there plans to be able to run a single job on several hosts?



REX was designed to run SSH against each host separately. In theory you could achieve something similar with puppet or ansible which parses the output and store it as configuration report, but there’s no visualization of two reports on one page. You could experiment with Report templates. I can imagine a report template that would have input a job that was ran on multiple hosts. The report template would look at subtasks (each host generates one subtask), reads its output and do some parsing. Then it would generate the report based on it. This would be quite new thing, but should be doable with some knowledge of Ruby.

Another (and slower) way is do the similar but through API. Every job output is accessible via REST API and hammer CLI.


Thanks Marek_Hulan for your answer. It sounds complex and no very productive.

It would be very nice a new functionality to exec jobs over hosts grouped. It would be very useful for this (reports) to manage dependen hosts easy and to take adventage of have an ansible inventory of several hosts when you exec a job template with ansible provider.