added key checks and logging to jinja2 processing
[yaml_builds.git] / templates / baremetal / promjoin.j2
index c28363d..d16b48e 100644 (file)
@@ -35,9 +35,9 @@ data:
 {% for server in yaml.masters %}
           - '{{server.name}}'
 {% endfor %}
-{% for server in yaml.workers %}
+{% if 'workers' in yaml %}{% for server in yaml.workers %}
           - '{{server.name}}'
-{% endfor %}
+{% endfor %}{% endif %}
 {% raw %}  # TODO(alanmeadows) move what is global about this document - everything except nodenames to global
   assets:
     - path: /opt/promjoin.sh