Below is the task… I need to connect to host server… fetch the host name nad current java version and store it in the database on local server. I am able to fetch the host name and java version… but need assistance reading the sotring the value of variable in DATABASE. Can anyone please suggest how to proceed with that -
I think you just need to find or write a module to store the results using some sql. I found a reference to some oracle modules here https://liquidat.wordpress.com/2017/02/17/ansible-community-modules-for-oracle-db-asm/ including a couple of modules for this interacting with database.
If you go with oracle, consider using Merge On syntax which would give you a sort of idempotent behavior. Mysql likely has something similar too, although I don't know what the syntax might be.
Hope thus helps,
Jon