trouble with shell egrep escaping chars

Dear all,

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)?

Cheers, Kai

Escape the backslash and remove the regex_escape()

shell: "{{java_home}}/bin/java -version 2>&1 | grep 'java version' | egrep '{{ '1\\.[789]' }}'"

G'day!