title: why ansible always replaces double quotes with single quotes in templates?
body: <p>I am trying to generate Dockerfiles with Ansible template -  see the role source and the template in Ansible Galaxy and <a href="https://github.com/peruncs/docker" rel="noreferrer">Github</a></p>
  
  <p>I need to genarate a standard Dockerfile line like:</p>
  
  <pre><code>...
  VOLUME ["/etc/postgresql/9.4"]
  ...
  </code></pre>
  
  <p>However, when I put this in the input file:</p>
  
  <pre><code>...
  instruction: CMD
  value: "[\"/etc/postgresql/{{postgresql_version}}\"]"
  ...
  </code></pre>
  
  <p>It ends up rendered like:</p>
  
  <pre><code>...
  VOLUME ['/etc/postgresql/9.4']
  ...
  </code></pre>
  
  <p>and I lose the " (which renders the Dockerfiles useless)</p>
  
  <p>Any help ? How can I convince Jinja to not substitute " with ' ? I tried  <strong>\"</strong> , <strong>|safe</strong> filter, even <strong>{% raw %}</strong> - it just keeps doing it!</p>
  
  <p><strong>Update:</strong>
  Here is how to reproduce the issue:</p>
  
  <p>Go get the <strong>peruncs.docker</strong> role from <strong>galaxy.ansible.com</strong> or Github (link is given above)
  Write up a simple playbook (say <strong>demo.yml</strong>) with the below content and run: <strong>ansible-playbook -v demo.yml</strong>. The <strong>-v</strong> option will allow you to see the temp directory where the generated <strong>Dockerfile</strong> goes with the broken content, so you can examine it. Generating the docker image is not important to succeed, just try to get the Dockerfile right.</p>
  
  <pre><code>- name: Build docker image
    hosts: localhost
    vars:
          - somevar: whatever        
          - image_tag: "blabla/booboo"
          - docker_copy_files: []
          - docker_file_content:
               - instruction: CMD
                 value: '["/usr/bin/runit", "{{somevar}}"]'
    roles:         
        - peruncs.docker
  </code></pre>
  
  <p>Thanks in advance!</p>