tomoh1r / ansible-vault

This project aim to R/W an ansible-vault yaml file
GNU General Public License v3.0
54 stars 32 forks source link

Incorrect version comparison logic #32

Closed obarkhatova closed 3 years ago

obarkhatova commented 4 years ago
_ANSIBLE_VER = float(".".join(ansible.__version__.split(".")[:2]))

    def _make_secrets(self, secret):
        if _ANSIBLE_VER < 2.4:
            return secret

The above code worked correctly up to 2.9 version. Current ansible version is 2.10. It's greater than 2.4, but float(2.10) is less than 2.4

stevebeck89 commented 4 years ago

I'm getting this a failure caused by this line as well. This causes this package to be incompatible with the latest 2.10 version of ansible.

metabsd commented 4 years ago

Same problem.

donovan commented 3 years ago

Same error here using

ansible==2.9.10
ansible-vault==1.2.0
tomoh1r commented 3 years ago

Sorry too late responses, but I fix it with #34 and version 2.0.0, check it out!