- name: include check_nfs.yml
include_tasks: check_nfs.yml
when: inventory_hostname in groups.get(nfs_group_name, [])
+
+- block:
+ - name: fail if [grafana-server] group doesn't exist
+ fail:
+ msg: "you must add a [grafana-server] group and add at least one node."
+ when: groups[grafana_server_group_name] is undefined
+
+ - name: fail when [grafana-server] doesn't contain at least one node.
+ fail:
+ msg: "you must add at least one node in the [grafana-server] hosts group"
+ when: groups[grafana_server_group_name] | length < 1
+ when: dashboard_enabled | bool
\ No newline at end of file