How to compare kernel (or other) version numbers in Ansible
There is a test for it: {{ ansible_distribution_version is version(‘12.04’, ‘>=’) }} {{ sample_version_var is version(‘1.0’, operator=”lt”, strict=True) }}
There is a test for it: {{ ansible_distribution_version is version(‘12.04’, ‘>=’) }} {{ sample_version_var is version(‘1.0’, operator=”lt”, strict=True) }}
With modern Git (1.8.3.4 in my case) and not using branches you can do: $ git rev-list –count HEAD 68 But this has all kinds of issues and might not be easy to reproduce or easy to get back to the commit hash in case you need to. So try to avoid it or use … Read more