Bug in gem module?

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

Thanks,

Michael

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.

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

Any ideas?

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