-
Notifications
You must be signed in to change notification settings - Fork 24.1k
Closed
Description
Here is the ansible code
- name: for debugging
debug: msg="{% if 'a' is equalto('a') %} true {% else %} false {% endif %}"
# debug: msg="{{ ansible_mounts|map(attribute='mount')|reject('equalto', '/') | list "
tags:
debug
the result showed
... template error while templating string: no test named 'equalto'
FATAL: all hosts have already failed -- aborting
OS: ubuntu 14.04
python:2.7
script how I installed ansible
$ sudo apt-get install software-properties-common
$ sudo apt-add-repository ppa:ansible/ansible
$ sudo apt-get update
$ sudo apt-get install ansible
ansible version
$ ansible --version
ansible 1.8.2
configured module search path = None
thierryherrmann
Activity
sivel commentedon Jan 29, 2015
The
equalto
test is provided by Jinja 2.8, which is currently tagged as Dev and not yet released. The current stable jinja2 release is 2.7.This is not an Ansible bug.
bcoca commentedon Feb 2, 2015
Is This A Bug?
Hi!
Thanks very much for your submission to Ansible. It sincerely means a lot to us.
We're not sure this is a bug, and we don't mean for this to be confrontational. Let's explain what we're thinking:
As such, we're going to close this ticket. However, we're open to being corrected, should you wish to discuss. You can stop by one of our two mailing lists
to talk about this and we might be persuaded otherwise.
Comments on closed tickets aren't something we monitor, so if you do disagree with this, a mailing list thread is probably appropriate.
Thank you once again for this and your interest in Ansible!
vhosakot commentedon Jan 9, 2018
pip install --upgrade Jinja2
resolved this error for me.rmetzler commentedon Mar 7, 2018
I'm still on Ubuntu 14.04 and had the very same problem. My workaround was to use the Dockerfile and build an image, run it, and copy my ssh-key inside the container.
Inside I used
to add my SSH-Key to the agent and then I was able to setup my cluster.