Hi guys,
I'm testing out some variable logic here, would really appreciate some
help.
I have the following content in one of my vars_files:
---
db:
- backend_oslo:
- name: db01
primary: server1
secondaries:
- server2
- server3
- backend_stockholm:
- name: db02
primary: server4
secondaries:
- server5
- server6
At a certain point in my playbook I have for instance "backend_oslo" in a
fact (I'm picking up this thru group_names earlier in the play)
I'd like to be able to register the "contents" of the "backend_oslo" item
in a dynamic fact so that I can access:
- name: db01
primary: server1
secondaries:
- server2
- server3
This is an exercise in trying to keep my intentory files as light as
possible. I'm not 100% comfortable with the list logic of yaml and how to
index into them dynamically. Is what I'm trying to do even possible using
the built-in filters?
--
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/2b3e6e25-0aa7-4703-9c23-2c5a95cfe4d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.