{% from "salt/map.jinja" import control with context %} {%- for cluster_name, cluster in control.cluster.iteritems() %} {%- for node_name, node in cluster.node.iteritems() %} {{ node_name }}.{{ cluster.domain }}: provider: {{ node.provider }} image: {{ node.image }} size: {{ node.size }} minion: master: {{ cluster.config.host }} id: {{ node_name }}.{{ cluster.domain }} {%- if node.userdata is defined %} userdata_file: /srv/salt/cloud/userdata/{{ cluster_name }}/{{ node_name }}.conf {%- endif %} {%- if 'ubuntu' in node.image|lower %} ssh_username: ubuntu {%- elif 'centos' in node.image|lower %} ssh_username: cloud-user {%- endif %} {%- endfor %} {%- endfor %}