Well, I'm obviously completely misunderstanding something.  Here's what the 
playbook looks like:

---
- hosts: gluster
  become: yes
  become_method: sudo
  gather_facts: no

  tasks:

  - name: Find out the healing status of /home
    gluster_heal_info:
      name: home
      status_filter: self-heal
    register: home_heal_status
    until: home_heal_status.glusterfs.heal_info | 
selectattr('no_of_entries','ne','0') | list | count == 0
    retries: 5
    delay: 10

  - name: Test if we can continue
    ping:

And here's the error I get:

fatal: [server1]: FAILED! => {"msg": "The conditional check 
'home_heal_status.glusterfs.heal_info | 
selectattr('no_of_entries','ne','0') | list | count == 0' failed. The error 
was: no test named 'ne'"}

Sure looks like 'ne' doesn't exist to me!

Harry


On Monday, March 2, 2020 at 4:41:08 PM UTC-5, Kai Stian Olstad wrote:
>
> On Mon, Mar 02, 2020 at 01:26:28PM -0800, harry devine wrote: 
> > Is there a "not equal to" jinja filter?  All of the documentation I find 
> > shows there's an 'equalto' but I can't seem to find any "no equalto" 
> > equivalent.  Even a greater than would work but I can't find anything 
> like 
> > that either. 
>
> There is not a "not equal to" filter or an "equalto" filer. 
> But you have a "not equal to" _test_ 
> https://jinja.palletsprojects.com/en/2.10.x/templates/#ne 
> As used in Daniels example 
>
> and an "equal to" _test_ 
> https://jinja.palletsprojects.com/en/2.10.x/templates/#eq 
>
> Greater then _test_ is called gt 
> https://jinja.palletsprojects.com/en/2.10.x/templates/#gt 
>
> All the _tests_ is here 
>
> https://jinja.palletsprojects.com/en/2.10.x/templates/#list-of-builtin-tests 
>
> -- 
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d42cd5a3-d150-4e68-85d4-bb58d4d06443%40googlegroups.com.

Reply via email to