Hey ,
I am trying to find out java version on all my host using the script
---
- name: Find java version
hosts: testservers
become: true
become_user: root
gather_facts: true
tasks:
- name: run these commands to find java version
command: java -version
How Can I edit the script, so that I can have a file with hostname and Java version of it on Ansible control Machine.