Scenario:
- using the inventory which contains more groups that might be not directly part of ceph deployment
Result:
- the prometheus.yml templated on the host will have additional non-ceph host in the
node section
- if the non-ceph host will be not available for some reason the cephmetrics deployment will fail on the first gather_facts playbook
Those are caused by the line the https://github.com/ceph/cephmetrics/blob/master/ansible/roles/ceph-prometheus/templates/prometheus.yml#L19:
{% for host in (groups['all'] | difference(groups['ceph-grafana'])) %}
and the playbook where the facts are gathered for all group https://github.com/ceph/cephmetrics/blob/e5873d512c98774a758b24375479ae27da57d345/ansible/playbook.yml#L2:L6
- hosts: all
gather_facts: true
any_errors_fatal: true
tags:
- always
I think the usage of group "all" here can be replaced by using some dynamic inventory. This approach would allow to have the other hosts in the inventory and would made the prometheus.yml template more precise.