The problem in the above configuration is, the variable "var1" in the foo.yml cannot be resolved to "my_cluster" defined in group_vars/all . I have to use the -e option of ansible-playbook explicitly. Is this how ansible works ? And how to realize my above purpose ?
I felt that. Then is there a way to define variable which can be used in the position of the mentioned "var1" in foo.yml ? Is the command line options (i.e., -e) is the only way ?
--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAEhzMJCeYJcE3MNUGtiyPx%2BdgpZ4RNFJGd42c2NWAXPT5NQk0w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
> If you want to pass in the host specifier, you'll need to use "-e". Or maybe a lookup plugin reading an environment variable. -e is a bit clear.
>
> -e @filename.yml is also a valid syntax.
Ok, I see. Thanks for mentioning the @filename.yml syntax also.