Ansible: Conditional with a package version

Written By :

Category :

ansible

Posted On :

Share This :

In this post I want to share something with you that I struggled to find: how to check the presence of a specific version of a package from the ansible facts. And for the example, I wil show it using ibm lpp_facts.

 

For impatient ones, the answer is the following:

 

when: ansible_facts.filesets.openssl.base[0].levels is version('1.1.1.2000', '<')