which rpm version??

I’m trying to write an ansible script to tell me which version of bash RPM a host is running.

Here is what I have so far:

[root@ansi playbooks]$ more which_bash.yml

ansible-playbook doesn't print the output of the commands it runs by default.
You could register: the stdout and then print it with a debug: task,
or just use adhoc commands:

   ansible myhost -a 'rpm -q bash'