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.

34 lines
675 B

  1. {
  2. "clusters": [
  3. {
  4. "nodes": [
  5. {% set nodeblocks = [] %}
  6. {% for node in nodes %}
  7. {% set nodeblock %}
  8. {
  9. "node": {
  10. "hostnames": {
  11. "manage": [
  12. "{{ node }}"
  13. ],
  14. "storage": [
  15. "{{ hostvars[node].ip }}"
  16. ]
  17. },
  18. "zone": 1
  19. },
  20. "devices": [
  21. {
  22. "name": "{{ hostvars[node]['disk_volume_device_1'] }}",
  23. "destroydata": false
  24. }
  25. ]
  26. }
  27. {% endset %}
  28. {% if nodeblocks.append(nodeblock) %}{% endif %}
  29. {% endfor %}
  30. {{ nodeblocks|join(',') }}
  31. ]
  32. }
  33. ]
  34. }