ansible-requirements-updater
ansible-requirements-updater copied to clipboard
Version comparison fails on things like 1.9 -> 1.10
I just ran this on drupal-vm
today and got:
- name: geerlingguy.java
- version: 1.10.0
+ version: 1.9.7
So... the version comparison is definitely not working as planned.
Hi Jeff,
I came here after seeing your Ansible Fest presentation. Great job with that, by the way!
https://github.com/geerlingguy/ansible-requirements-updater/blob/388c5f22a4abac6ece0741659a516ac6555bd048/tasks/update-requirement.yml#L19-L33
It shouldn't even be necessary to sort the data; The versions:
array is already sorted properly (i.e. the latest version is the first dictionary in the array).
I plan on creating a PR to address this issue and implement some other ideas I have to make the playbook more structurally sound. I will also take a stab at implementing #1.
I implemented a similar solution to find the latest version of a project on Github in one of my Ansible roles. [link]
Thank you again for all your great Ansible content! Watching/reading your educational content and just looking at your open-source Ansible code has been crucial to my Ansible journey.
-- Maxwell 😀