# Bug in gem module?

**URL:** <https://forum.ansible.com/t/bug-in-gem-module/22284>\
**Category:** Ansible Project\
**Created:** [August 13, 2016, 8:20am UTC](https://forum.ansible.com/t/bug-in-gem-module/22284 "2016-08-13T08:20:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaeleaton](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@michaeleaton](https://forum.ansible.com/u/michaeleaton)\
**Post date:** [August 13, 2016, 8:20am UTC](https://forum.ansible.com/t/bug-in-gem-module/22284/1 "2016-08-13T08:20:38Z")

</div>

Hi everyone,

I’m trying to install some sensu gems using the below - i don’t get any errors but I don’t get any success/failure messages either and the gems are not installed, what am I missing? Node is running CentOS 6.7 Final. Ansible v2.1

[https://gist.github.com/if-meaton/923486fec646644ffe721e3072821c5a](https://gist.github.com/if-meaton/923486fec646644ffe721e3072821c5a)

Thanks,

Michael

---

<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:** [August 13, 2016, 9:55am UTC](https://forum.ansible.com/t/bug-in-gem-module/22284/2 "2016-08-13T09:55:08Z")

</div>

Are you sure the role is running? Try running with -vvvv for starters.

It might help to post a full role, this

task path: /root/ansible/ansible-iom/roles/sensu-check/tasks/client.yml:18

doesn't match up with the other 2 snippets.

---

<div class="post-metadata">

**Author:** ![michaeleaton](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@michaeleaton](https://forum.ansible.com/u/michaeleaton)\
**Post date:** [August 13, 2016, 10:24am UTC](https://forum.ansible.com/t/bug-in-gem-module/22284/3 "2016-08-13T10:24:15Z")

</div>

Hi,

i’m sure the role is running, i’ve shown the output after running ansible-playbook:

[root@mgr-004-iom():ansible-iom] ansible-playbook site.yml --tags gems

PLAY [lbservers] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [setup] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ok: [nlb-002-iom]  
ok: [nlb-001-iom]

TASK [common : include] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
included: /root/ansible/ansible-iom/roles/common/tasks/selinux.yml for nlb-002-iom, nlb-001-iom

TASK [common : include] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
included: /root/ansible/ansible-iom/roles/common/tasks/yum.yml for nlb-002-iom, nlb-001-iom

TASK [network : include] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
included: /root/ansible/ansible-iom/roles/network/tasks/network.yml for nlb-002-iom, nlb-001-iom

TASK [network : include] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
included: /root/ansible/ansible-iom/roles/network/tasks/etchosts.yml for nlb-002-iom, nlb-001-iom

TASK [sensu-check : include] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
included: /root/ansible/ansible-iom/roles/sensu-check/tasks/common.yml for nlb-002-iom, nlb-001-iom

TASK [sensu-check : include] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
included: /root/ansible/ansible-iom/roles/sensu-check/tasks/client.yml for nlb-002-iom, nlb-001-iom

TASK [sensu-check : SENSU | Install required gems] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [nginx : include] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
included: /root/ansible/ansible-iom/roles/nginx/tasks/nginx.yml for nlb-002-iom, nlb-001-iom

TASK [nginx : include] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
included: /root/ansible/ansible-iom/roles/nginx/tasks/vhosts.yml for nlb-002-iom, nlb-001-iom

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
nlb-001-iom : ok=9 changed=0 unreachable=0 failed=0  
nlb-002-iom : ok=9 changed=0 unreachable=0 failed=0

If you look at the task for installing gems, there is no output…

Running the task with -vvvv doesn’t show anything extra:

[http://pastebin.com/CjEqU0nN](http://pastebin.com/CjEqU0nN)

Any ideas?

---

<div class="post-metadata">

**Author:** ![Marcus\_Franke1](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@Marcus\_Franke1](https://forum.ansible.com/u/Marcus_Franke1)\
**Post date:** [August 15, 2016, 12:30pm UTC](https://forum.ansible.com/t/bug-in-gem-module/22284/4 "2016-08-15T12:30:30Z")

</div>

Have you checked for the executable: "{{ sensu\_embedded\_path }}/gem"?  
Maybe this gem version dies silently and thus ansible does not recognize the  
failure condition? Can you call the gem executable in a shell and install a  
gem this way? Even as the user ansible is running under?

Btw. what about the vmstat gem, isn't the plugin called sensu-plugins-vmstats?

Regards,  
Marcus
