Using Ansible 1.7.2 on Centos 6.6 (installed from EPEL), I'm trying to
execute a command which contains escaped brackets. I get different results
when I move the command into an items list. Here it is boiled down to a
trivial example:
This works:
- shell: echo special {{ '{{' }} string {{ '}}' }} test
Verbose output shows Ansible executes this:
ESTABLISH CONNECTION FOR USER: root
REMOTE_MODULE command *echo special {{ string }} test* #USE_SHELL
However, this doesn't:
- shell: echo {{ item }}
with_items:
- special {{ '{{' }} string {{ '}}' }} test
When this same string is executed from a list of items, the resulting
command has '#' characters in place of one bracket in each occurance:
ESTABLISH CONNECTION FOR USER: root
REMOTE_MODULE command *echo special {# string #} test* #USE_SHELL
--
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/c6e6f808-0e8e-4e2c-a649-762676a831c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.