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 <[email protected]> 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 [email protected].
> To post to this group, send email to [email protected].
> 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 [email protected].
To post to this group, send email to [email protected].
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.

Reply via email to