New version of salt-formula from Saltstack
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 yıl önce
12345678910111213141516171819202122232425
  1. {% from "salt/map.jinja" import control with context %}
  2. {%- for cluster_name, cluster in control.cluster.iteritems() %}
  3. {%- for node_name, node in cluster.node.iteritems() %}
  4. {{ node_name }}.{{ cluster.domain }}:
  5. provider: {{ node.provider }}
  6. image: {{ node.image }}
  7. size: {{ node.size }}
  8. minion:
  9. master: {{ cluster.config.host }}
  10. id: {{ node_name }}.{{ cluster.domain }}
  11. {%- if node.userdata is defined %}
  12. userdata_file: /srv/salt/cloud/userdata/{{ cluster_name }}/{{ node_name }}.conf
  13. {%- endif %}
  14. {%- if 'ubuntu' in node.image|lower %}
  15. ssh_username: ubuntu
  16. {%- elif 'centos' in node.image|lower %}
  17. ssh_username: cloud-user
  18. {%- endif %}
  19. {%- endfor %}
  20. {%- endfor %}