Description of problem: with a fresh checkout from Jul 04 2017: TASK [sensu/server : Configure sensu checks] *********************************** failed: [monitoring] (item=sensu-checks) => {"failed": true, "item": "sensu-checks", "msg": "KeyError: 'undefined variable: 0'"} ok: [monitoring] => (item=sensu-haproxy-check) I used ansible-playbook pyml -e config.yml with cat config.yml kibana_proxy_user: admin kibana_proxy_pass: changeme rabbitmq_server: localhost grafana_server_address: 192.168.36.60 firewall_manage_rules: false and inventory/hosts being --------- monitoring ansible_host=192.168.36.60 ansible_user=centos ansible_become=true [logging_hosts] [am_hosts] monitoring [pm_hosts] ------------
This is related to https://github.com/ansible/ansible/issues/20063 and seems to be related to the ansible version used while templating. I had the same error using my Fedora 26 host with ansible-2.3.1.0-1.fc26.noarch. As I am deploying this for OpenStack I successfully used ansible-2.2.1.0-1.el7.noarch on the Undercloud.
Uhm, it seems that the referenced change in ansible did not fix the issue: https://github.com/ansible/ansible/commit/188c3c608afa74b80f1f9ead8c6cf2cc0d23391e
There is also https://github.com/ansible/ansible/issues/23779
(In reply to Matthias Runge from comment #2) > Uhm, it seems that the referenced change in ansible did not fix the issue: > https://github.com/ansible/ansible/commit/ > 188c3c608afa74b80f1f9ead8c6cf2cc0d23391e IS this something that we can fix or it's an ansible bug and we have to wait until it will be fixed ? We need to think about some workaround in order to get opstools server installed.
The workaround is already there: we are using opstools for OpenStack and we can install it from the director via provided and working ansible.... ansible-2.2.1.0-1.el7.noarch : SSH-based configuration management, deployment, and task execution system Source : @rhel-7-server-openstack-10-rpms
Ideally, you'd have the monitoring server deployed before installing the OpenStack environment. #c5 is surely a workaround. I currently don't understand, why it was marked as fixed in https://github.com/ansible/ansible/commit/188c3c608afa74b80f1f9ead8c6cf2cc0d23391e but still happens. The workaround for opstools-ansible would be to remove the includes, which is quite ugly. I consider this to be an ansible bug.
Hey, any update regarding this bug ? Still can't install opstools-ansible
There is no change.
Looking at this again, it seems to be an ansible upstream bug https://github.com/ansible/ansible/issues/20494 and there is a proposed fix for it https://github.com/zmedico/ansible/commit/db6966969ff437bf7f7c9c7e474fc22a1d6131de
The proposed fix in ansible fixes this issue here
Works for me with ansible-2.4.1.0-1.el7ae.noarch