Is there any way to query and get results on which server Oracle JRE is installed via chef . we have like 500+ servers both windows and linux platforms hosted on AWS and these servers got registered to chef , my requirement is to get a report on what all the servers Oracle JRE is installed on using chef.
I do not know how you install java on your nodes, but if all nodes are registered to the chef-server you could try searching from the chef-server
knife node show <node_name> --long --attribute languages --format json knife node show <node_name> --long --attribute packages --format json
If you can find the oracle jre somewhere in these two attributes, then you can do knife search with a specific filter.
If none of the above knife node show commands contain the desired data, then you could do: knife ssh <node_name> 'java -version' --ssh-user <user> -ssh-password <password> -a ipaddress