2 ways I can think of, first is use 'package_facts' to get the info
for version, the other is a shell task with something like  `apt show
htop|grep Version|cut -f 2 -d':'`

Then you write the apt task using version test.
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/version_test.html

-- 
----------
Brian Coca

-- 
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/CACVha7eV3RcKHm8kj5mSQSQRabZe2Hv6DN8sBbuUmhW3omXHhA%40mail.gmail.com.

Reply via email to