title: ansible variables inside variables
body: <p>I'm trying to build a role which uses some variables from a file.
  Though this variables also depend on some common variable which I want to define for all roles only one without copy&amp;paste it to every single variable file.</p>
  
  <p>Though I can't understand how I can do that. I'm talking about vars file only.</p>
  
  <p>E.g. roles/dns/tasks/main.yml includes file for specific location:</p>
  
  <pre><code>- include_vars: ../vars/dns/domains_{{ location }}.yml
  </code></pre>
  
  <p>location is defined on role level. Inside this I'm trying to define settings for various dns names, e.g.:</p>
  
  <pre><code>domains: [
    {
      domain: "domain.com",
      location: "america", 
      ip: "xx.xx.xx.xx",
      ttl: 1800,
      mx: "10 mail",
      subdomains: [
        { name: "www",    ip: "xx.xx.xx.xx"},
      ]   
    },  
  ]
  </code></pre>
  
  <p>so here I have the same IP defined for each and every entry.
  Is there a way to put all IPs into some global var file (e.g. group_vars/all/vars_file.yml ) and use it inside this role specific var file like this:</p>
  
  <pre><code>domains: [
    {
      domain: "domain.com",
      location: "america", 
      ip: server.america.ip,
      ttl: 1800,
      mx: "10 mail",
      subdomains: [
        { name: "www",    ip: server.america.ip },
      ]   
    },  
  ]
  </code></pre>
  
  <p>where server.america.ip is defined somewhere global?</p>