Vars from Script ?

I’ve got a situation where many provisioning vars are stored in a 3rd party app.

Is there a way to use the output of an external script to populate vars?

Something like:

  • vars_file: my_script

or

  • vars_script: my_script

Thanks in advance.

OK my solution was to create a custom module that returns json with ansible_facts.

tasks:

  • local_action: set_variables
    sudo: false

Glad you solved the problem. Please share with me what the solution was. I would like to know.

JPM did a great writeup on this:

http://jpmens.net/2012/07/15/ansible-it-s-a-fact/