Hello,
in a play file I have a test for current node.js version:
- name: Node.js | Checking installed version of node.js
action: shell /usr/bin/test “$(node -v 2> /dev/null)” = v${node_version}
register: wanted_version_installed
ignore_errors: True
and later I skip some tasks by using when_failed like this:
- name: Node.js | Fetching node.js source
action: get_url url=http://nodejs.org/dist/v${node_version}/${node_tarball} dest=/tmp/
when_failed: $wanted_version_installed
However all I get is:
fatal: [192.168.111.222] => Conditional expression must evaluate to True or False: is_failed($wanted_version_installed)
How should I rewrite it?
Regards,
Michal