I'm not entirely sure what I changed, but {{ '{{' }} .Id {{ '}}' }}
started working for me.
Thanks for the alternatives, I'll keep those in mind.
On 8/8/2014 4:32 PM, Michael DeHaan wrote:
Alternatively, you could also do:
\{\{.Id\}\}
Or
{% raw %}{{ .Id }}{% endraw %}
I probably prefer the raw/endraw most of the time.
On Fri, Aug 8, 2014 at 5:35 PM, Michael Peters
<michael00pet...@gmail.com <mailto:michael00pet...@gmail.com>> wrote:
Probably not the best way, but you could use a string inside of the
jinja templating
- name: obtain image id
local_action: shell docker inspect --format={{ '{{.Id}}' }} {{
docker_image_name }} | cut
register: docker_image_id
On Fri, Aug 8, 2014 at 1:04 PM, Vijay Korapaty
<ansiblel...@korapaty.com <mailto:ansiblel...@korapaty.com>> wrote:
> I'm trying to execute the following task:
>
> - name: obtain image id
>
> local_action: shell docker inspect --format={{.Id}} {{
> docker_image_name }} | cut
>
> register: docker_image_id
>
>
> where '{{.Id}}' should not be considered as a variable. I've
tried escaping
> it in this fashion: {{ '{{' }} .Id {{ '}}' }} as described by
the Jinja2
> docs, but that results in it appearing as '{# .Id #}'. I'm
assuming that
> it's still being considered as a variable.
>
> Is there a way to force double curly brackets to not be
considered as a
> variable?
>
> Thanks.
>
> --
> You received this message because you are subscribed to the
Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from
it, send an
> email to ansible-project+unsubscr...@googlegroups.com
<mailto:ansible-project%2bunsubscr...@googlegroups.com>.
> To post to this group, send email to
ansible-project@googlegroups.com
<mailto:ansible-project@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/ansible-project/53E50320.3090603%40korapaty.com.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to ansible-project+unsubscr...@googlegroups.com
<mailto:ansible-project%2bunsubscr...@googlegroups.com>.
To post to this group, send email to
ansible-project@googlegroups.com
<mailto:ansible-project@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAJQqANft6beoWMkgr_9fy8nwdriFpRq_30tvDkM%3DOJxneEVWyg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ansible-project+unsubscr...@googlegroups.com
<mailto:ansible-project+unsubscr...@googlegroups.com>.
To post to this group, send email to ansible-project@googlegroups.com
<mailto:ansible-project@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgwYiKqYu0CepN70vQuCGoVY9nBQ3HcXxxobSJ_ienhUgw%40mail.gmail.com
<https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgwYiKqYu0CepN70vQuCGoVY9nBQ3HcXxxobSJ_ienhUgw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Ansible
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/53E5783C.7020105%40korapaty.com.
For more options, visit https://groups.google.com/d/optout.