Commit ea44783f authored by Guillaume Abrioux's avatar Guillaume Abrioux
Browse files

validate: add checks for grafana-server group definition



this commit adds two checks:
- check that the `[grafana-server]` group is defined
- check that the `[grafana-server]` contains at least one node.
Signed-off-by: default avatarGuillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 02beb009)
parent e2b41a17
......@@ -105,3 +105,15 @@
- 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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment