I have a query regarding vars structure in Ansible.

Example: 

 -vars
   - sample.yml

 - tasks
    - main.yml


In task:
 
include_vars: sample.yml

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

*                            or*

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

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 
https://groups.google.com/d/msgid/ansible-project/93ea33d1-f690-44ec-b5d4-c7c96be331c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to