title: Evaluate dynamic variable name in ansible
body: <p>I have vars where I put something like this:</p>
  <pre><code>vars/main.yml
  hello_port: 80
  world_port: 81
  </code></pre>
  <p>in my ansbile file I load the vars with</p>
  <pre><code>vars_files:
    - ./vars/main.yml
  </code></pre>
  <p>This is how I initialize m_name:</p>
  <pre><code> - name: set_fact
       set_fact:
          m_name:
            - 'hello'
            - 'world'
  </code></pre>
  <p>and after that I have task with iterate using with_items:</p>
  <pre><code> - debug:
        msg: &quot;{{ (item + '_port') }}&quot;
     with_items: &quot;{{ m_name }}&quot;
  </code></pre>
  <p>But I've got as output</p>
  <pre><code>hello_port
  world_port
  </code></pre>
  <p>not their values.</p>
  <hr />
  <p>OK I find that if I use debug var it is working. But If I want to put this expression <code>&quot;{{ (item + '_port') }}&quot;</code> for an example in shell task it does not evaluate it. Is there a way to evaluate the dynamically created variables name - to get the value?</p>