On Tue, 27 Jan 2015 21:58 -0200, Giovanni Tirloni <[email protected]>
wrote:
>  There is some information that I've to gather by running commands,
>  because it doesn't exist as facts, and later I use set_fact to define
>  facts that will be used by other tasks in calculating things.
> 
>  Since the command module doesn't run in check mode, I was wondering if
>  I could first run a playbook to gather the facts (both automatically by
>  Ansible and through my command/set_fact tasks) and use fact caching to
>  later use these facts in another playbook run.
> 
>  I tried it and it works fine for Ansible facts (with Redis), but not
>  for the facts I created with set_fact. Just wanted to check if that's
>  expected, if there is a better way to do this and, finally, if anyone
>  is interested in having this functionality (if it doesn't exist)?

It looks like a better way is to create a module in library/ that
outputs custom facts in JSON format. Then fact caching works fine.

Giovanni



-- 
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/1422445973.160928.219943025.72A8FFBD%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to