Skip to content

no test named 'equalto' #10123

@coderplay

Description

@coderplay

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

Activity

sivel

sivel commented on Jan 29, 2015

@sivel
Member

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

bcoca commented on Feb 2, 2015

@bcoca
Member

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 @sivel posted above, this is not an Ansible issue

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

vhosakot commented on Jan 9, 2018

@vhosakot

pip install --upgrade Jinja2 resolved this error for me.

rmetzler

rmetzler commented on Mar 7, 2018

@rmetzler
Contributor

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

chown -R root:root /root/.ssh
eval `ssh-agent -s`
ssh-add

to add my SSH-Key to the agent and then I was able to setup my cluster.

locked and limited conversation to collaborators on Apr 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @sivel@rmetzler@coderplay@bcoca@vhosakot

        Issue actions

          no test named 'equalto' · Issue #10123 · ansible/ansible