G'day!

On 03-08-16 12:18, Kai Stian Olstad wrote:
> On 03.08.2016 10:39, Kai wrote:
>> I cannot get the following line to work:
>>
>>  shell: "{{java_home}}/bin/java -version 2>&1 | grep 'java version' |
>> egrep '{{ '1\.[789]' | regex_escape() }}'"
>>
>> Obviously this line already went through quite some iterations, but I
>> cannot get the YAML parser to even accept ist. It always throws a
>> "Syntax Error while loading YAML" with a mark pointing to the "\"
>> character.
>>
>> Is there any chance gatting this to work (or testing for a allowed range
>> of java version by any other means)?
> 
> Escape the backslash and remove the regex_escape()
> 
> shell: "{{java_home}}/bin/java -version 2>&1 | grep 'java version' |
> egrep '{{ '1\\.[789]' }}'"

Yeah, this line passes the syntax check. Thanks a lot.

Cheers, Kai

-- 
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/caf03e9b-cd01-8d91-2ae0-3da638a97654%40gmx.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to