That works. One "gotcha" was that I had used to extract out the numeric part of the original version string, using regex_search() but the result from that was an array,so I to use a "first" to get the actual string, which I then used with the version().
Thanks, Jim On Friday, January 28, 2022 at 7:53:13 PM UTC-5 [email protected] wrote: > On Thu, 27 Jan 2022 15:08:52 -0800 (PST) > o haya <[email protected]> wrote: > > > "msg": "The play_mysql_version is 8.0.28-1.el7", > > ... checks that the "numeric part" of the version string that is in > > play_mysql_version, i.e. "8.0.28", is greater than, or equal to, > "8.0.28". > > See "Comparing versions" > > https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html#comparing-versions > > Test it first, e.g. > > - debug: > msg: Install additional dependency > when: play_mysql_version is version ('8.0.28','>=') > > -- > Vladimir Botka > -- 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/9ff0d710-81d9-48b5-8e90-ca47fec96d87n%40googlegroups.com.
