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 Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to