On Thu, 14 Nov 2019 16:58:01 -0600
Matt Martz <[email protected]> wrote:

> The syntax you are using was deprecated in Ansible 2.5 and should have been
> emitting a deprecation warning. See this doc for more info:
> https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.5.html#jinja-tests-used-as-filters
> Effectively you need to change the `|` to `is`
> >
> > After running ansible 2.9, I'm getting these errors:
> > ... no filter named 'version_compare'...
> >
> >       when:
> >         - ansible_distribution_major_version | version_compare('6', '=')

In addition to changing the deprecated syntax use "version" instead of
"version_compare"
https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html#version-comparison

(Just curious). It's not clear why 2.9 complains "no filter named
'version_compare'". Both names of the filter are present in 2.9 source
https://github.com/ansible/ansible/blob/stable-2.9/lib/ansible/plugins/test/core.py

            # version comparison
            'version_compare': version_compare,
            'version': version_compare,

(lines 199-201)

, and I can't find any explanation in the "porting guides" and "release notes"
either.
https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html
https://docs.ansible.com/ansible/latest/porting_guides/

What am I missing ?

Thank you,

        -vlado

-- 
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/20191115084520.5334802c%40gmail.com.

Attachment: pgpDhVNTNPqyO.pgp
Description: OpenPGP digital signature

Reply via email to