# which rpm version??

**URL:** <https://forum.ansible.com/t/which-rpm-version/21740>\
**Category:** Ansible Project\
**Created:** [June 11, 2016, 4:31am UTC](https://forum.ansible.com/t/which-rpm-version/21740 "2016-06-11T04:31:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![John.1209](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@John.1209](https://forum.ansible.com/u/John.1209)\
**Post date:** [June 11, 2016, 4:31am UTC](https://forum.ansible.com/t/which-rpm-version/21740/1 "2016-06-11T04:31:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Dick\_Davies](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Dick\_Davies](https://forum.ansible.com/u/Dick_Davies)\
**Post date:** [June 11, 2016, 8:17am UTC](https://forum.ansible.com/t/which-rpm-version/21740/2 "2016-06-11T08:17:32Z")

</div>

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:

&nbsp;&nbsp;&nbsp;ansible myhost -a 'rpm -q bash'
