From 1bf3fc42d10df77bf6f47f443f6765cab55cb380 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Mon, 30 Jan 2023 15:58:12 +0100 Subject: [PATCH] Fix undefined cephadm_host_labels Fixes #74 --- roles/cephadm/templates/cluster.yml.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/cephadm/templates/cluster.yml.j2 b/roles/cephadm/templates/cluster.yml.j2 index 475dac0..a28bc4b 100644 --- a/roles/cephadm/templates/cluster.yml.j2 +++ b/roles/cephadm/templates/cluster.yml.j2 @@ -21,8 +21,8 @@ labels: {% if host in groups.get('ingress', []) %} - ingress {% endif %} -{% if hostvars[host].cephadm_host_labels | length > 0 %} -{{ hostvars[host].cephadm_host_labels }} +{% if hostvars[host].get('cephadm_host_labels', []) | length > 0 %} +{{ hostvars[host].get('cephadm_host_labels', []) }} {% endif %} {% endfor %} ---