Single quotes inside Jinja2 string literals

How can I include single quotes in single-quoted Jinja2 string literals in Ansible 2.0?

Minimal test case:

`

I am getting the same error using ansible 2.1 stable branch. Did you find a work around for this?

`

  • name: Set ELB variables
    set_fact:
    host: “{{ elb_ins.elb.dns_name }}”
    url: ‘http//{{ elb_ins.elb.dns_name }}/Server/’
    `

Hi Deepali,

Sadly, I haven’t found a work-around and am still using Ansible 1.9 since this bug is a big blocker for me…

If you want, you could post a comment on the GitHub issue I’ve created for this some time ago, to let the Ansible team know this affects not just me: https://github.com/ansible/ansible/issues/14172

Cheers,
Christian