sensu / sensu-ansible

An Ansible role to deploy a fully dynamic Sensu stack!
https://ansible-sensu.readthedocs.io
MIT License
126 stars 96 forks source link

Wrong client subscriptions with Amazon Tags #198

Closed diegombeltran closed 5 years ago

diegombeltran commented 5 years ago

Sensu role writes wrong client subscriptions if using Ansible dynamic inventory script, Amazon tags, and "sensu_client_subscriptions" variable by default:

This is how it should look like: github1 This is how it looks after running the role: github

The second picture has several Amazon EC2 instance's tags which shouldn't be used (or even checked) at all.

jaredledvina commented 5 years ago

Hey @diegombeltran,

Thanks for the issue, I can't say I've seen this one before so, I've got some questions.

What have you currently configured `sensu_client_subscriptions to? Currently, we default that togroup_names` here: https://github.com/sensu/sensu-ansible/blob/master/defaults/main.yml#L81 which is a special Ansible variable https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.html?highlight=group_names

I know that the ec2 inventory script automatically adds hosts to those tag_key_val groups, so those entries make sense to me if that's the inventory your using. Did you manually override sensu_client_subscriptions to have the two entries in the first image? If so, where/how did you configure that?

jaredledvina commented 5 years ago

Hey @diegombeltran, Any chance you were able to review my questions above?

jaredledvina commented 5 years ago

Closing this out for now, feel free to re-open if you're still having issues, happy to help!