Please excuse my replying to myself: some amendments, and the results of
additional searching.

On 03/01/14 16:34, Nick wrote:
> - If so, can I create list elements?
This post suggests not:
https://groups.google.com/d/msg/ansible-project/cPbCD6R9TnE/-6StqLZjKX0J

But that it may be added later?

>
> - Can I set complex values?  i.e. assign a datastructure like { x: 1, y: 2 }
> to some variable?
>
> - Can I change existing facts?  (Both ones it has set and ones set
> elsewhere.)  Delete them?  If not, what happens if I try?
>
> - Presumably all facts it sets are accessible in the
> hostvars[inventory_hostname] namespace?  (Since these are facts, this is
> implied but not explicit, and I wonder if they might be in their own namespace
> to avoid tangling with existing facts.)
>
> - Canthe phrase "survive between plays" be clarified?  This could mean merely
> that the facts endure to the end of the execution of a playbook, but I would
> have been surprised if they didn't, and the possibility that they might not
> makes me wonder if registered variables and those set by modules return values
> don't.  The docs don't say anything about a registered variable's lifespan:
> http://docs.ansible.com/playbooks_variables.html.

My mistake, re-reading it I find: "Registered variables are valid on the host
the remainder of the playbook run, which is the same as the lifetime of "facts"
in Ansible. Effectively registered variables are just like facts."

However, the lifetime of "facts" is not defined. Maybe it should be?  As I
understand it "facts" in the sense of system attributes are persistent between
runs, but Ansibles' internal store of collected "facts" endure for the play (or
playbook?), but not between runs.  The difference is muddied since (also, as I
understand it) the internal "facts" data structure, or some portion of it, gets
re-created at the start of each play by the 'setup' module.


N

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to