I know i suggested writing a module, but one thing you can do which might be 
close to what you are trying is using a script to add custom facts to your 
systems. There's a nice write up of doing this here. 
http://hindenes.com/trondsworking/2016/11/05/using-ansible-as-a-software-inventory-db-for-your-windows-nodes/
This might be easier as you don't have to create an entire module.
As you have seen, you can return data from a script, but by extending facts, it 
is more straightforward to use the extra info you have gathered later in your 
playbook.

Hope this helps, 

Jon

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5280fc42-354a-435b-8155-707178b005a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to