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]' }}'"
--
Kai Stian Olstad
--
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/ae0e323b77b53a0ac0cc1622799f4f8b%40olstad.com.
For more options, visit https://groups.google.com/d/optout.