title: Ansible read Jinja Template from a variable (src is a variable)
body: <p>I have following question:</p>
  <p>Is it possible to pass a variable containing a jinja template to the src in the template module in Ansible. Like so:</p>
  <pre><code>- name: Create File from Jinja Template
    template:
      src: &quot;{{foo.json.config}}&quot;
      dest: dest=&quot;{{ foo_path }}/{{foo.json.name}}.conf&quot;
  </code></pre>
  <p>If I run this task I have following error:</p>
  <pre><code>Could not find or access ...here goes the print of the content of the variable...
  If you are using a module and expect the file to exist on the remote, see the remote_src option
  </code></pre>
  <p>Background:</p>
  <p>In my ansible role I request the template from an API. The json object I receive (<code>foo.json.config</code>) contains a ready-to-use jinja template for example:</p>
  <pre><code>some_key: {{value}}
  </code></pre>
  <p>Thanks</p>