I did look at the stats module early on, but you make a really good point.
I'll revist that module and see if I can steal some ideas from it. If not,
I can always stick with a state tracking file.
On Mon, Oct 22, 2018 at 11:47 AM Brian Coca wrote:
> not sure if this is what you want/need but
Whoops, didn't reply all...
-- Forwarded message -
From: Michael Johnson
Date: Mon, Oct 22, 2018 at 2:01 PM
Subject: Re: [ansible-devel] tracking state between module calls
To:
Thanks Luke!
It's good to have confirmation that I am not going completely off the rails
not sure if this is what you want/need but aside from normal vars you
can also use 'stats'
https://docs.ansible.com/ansible/latest/modules/set_stats_module.html
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
My two cents. I think you're on the right track! There isn't much out
there for this specifically in Ansible that is obvious.
I do know that testinfra was created to test against specific states, so
you can make verification steps, if that is useful:
https://testinfra.readthedocs.io/en/latest/
Is there an "official" way to track state between module calls? I've come
up with one option where I read a state file on each invocation, update the
data and then write out the state file at the end, but it seems like this
should be able to be done in memory without having to constantly