Hi all ,
I have multiple vars file in roles/vars directory.
I chose the respective var file based on --extra-vars c=01
and use -e DB=ketb-syb-09 to set facts.
However I use this -e DB value to deduce many other variables
Firstly I used set_facts under my task to set a variable called agentname.
- set_facts:
Agentname : "{% if else condition on -e DB %}"
# I haven't written the logic here since it was huge. But it's a "if else if "
clause to deduce agentname depending on different conditions.
Now this agentname should be passed to include_vars file ...
Ex of my include_vars file ->
ctl1.yml
Ctl:
- atrr : hi
Vaku : hiuuh
- attr: hello
Vaku : go-to{{ agentname }}
How do I load variables generated from setfacts into roles vars file ????
Please assist.
I've been searching quite long in this
--
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/4137812b-a8d3-4402-b112-af4f6d48ae6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.