I have a query regarding vars structure in Ansible.


   - sample.yml

 - tasks
    - main.yml

In task:
include_vars: sample.yml

* - copy: src={{vars[inventory_hostname_short + '_instance' }} 

*                            or*

 * - copy: src={{vars/sample.yml[inventory_hostname_short + '_instance' }} 

The above copy command searching for main.yml in vars. 

*--> How should we consider taking sample.yml instead of vars ??*

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.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to