How to Effectively verify Cisco IOS code upgrade verification in large environment ?

Freinds,

I wanted to create a playbook which I can take handy to verify my Cisco IOS device to check following things for me:-

a) creating a logic to confirm reload uptime is recent (i.e is after the upgrade & reload)
b) matching the latest code from the boot.
c) collectively displaying the number successful and non-successful upgrades based on above parameter. (Most important because of large number of devices I shall be considering for upgrade based on verification done)

Following above objectives I also wanted to:-
d) create a dictionary/list which would also have list of latest codes based on different IOS model, which can be picked to match to confirm the device has been upgraded to correct version or not.

I created a playbook which does the very basic job. I would like to get the a output which can run on 100 devices and give me a output like how many devices has the desired code and how does not, in a precise format ?

Can some please help on how can I achieve above milestone?

-bash-4.1$ cat ios_post_check.yml