@@ -370,6 +370,23 @@ resource "openstack_compute_instance_v2" "login" {
370
370
- " ${openstack_compute_keypair_v2.cluster_keypair.public_key}"
371
371
{%- endif %}
372
372
EOF
373
+
374
+ metadata = {
375
+ {% for playbook in ansible_init_playbooks %}
376
+ ansible_init_pb_{{ loop.index0 }}_name = " {{ playbook.name }}"
377
+ {% if playbook.stage is defined %}
378
+ ansible_init_pb_{{ loop.index0 }}_stage = " {{ playbook.stage }}"
379
+ {% endif %}
380
+ {% endfor %}
381
+ {% for collection in ansible_init_collections %}
382
+ ansible_init_coll_{{ loop.index0 }}_name = " {{ collection.name }}"
383
+ ansible_init_coll_{{ loop.index0 }}_type = " {{ collection.type }}"
384
+ ansible_init_coll_{{ loop.index0 }}_version = " {{ collection.version }}"
385
+ {% if collection.source is defined %}
386
+ ansible_init_coll_{{ loop.index0 }}_source = " {{ collection.source }}"
387
+ {% endif %}
388
+ {% endfor %}
389
+ }
373
390
}
374
391
375
392
resource " openstack_compute_instance_v2" " control" {
@@ -446,6 +463,23 @@ resource "openstack_compute_instance_v2" "control" {
446
463
- [LABEL =home, /exports /home, auto]
447
464
{% endif %}
448
465
EOF
466
+
467
+ metadata = {
468
+ {% for playbook in ansible_init_playbooks %}
469
+ ansible_init_pb_{{ loop.index0 }}_name = " {{ playbook.name }}"
470
+ {% if playbook.stage is defined %}
471
+ ansible_init_pb_{{ loop.index0 }}_stage = " {{ playbook.stage }}"
472
+ {% endif %}
473
+ {% endfor %}
474
+ {% for collection in ansible_init_collections %}
475
+ ansible_init_coll_{{ loop.index0 }}_name = " {{ collection.name }}"
476
+ ansible_init_coll_{{ loop.index0 }}_type = " {{ collection.type }}"
477
+ ansible_init_coll_{{ loop.index0 }}_version = " {{ collection.version }}"
478
+ {% if collection.source is defined %}
479
+ ansible_init_coll_{{ loop.index0 }}_source = " {{ collection.source }}"
480
+ {% endif %}
481
+ {% endfor %}
482
+ }
449
483
}
450
484
451
485
{% for partition in openhpc_slurm_partitions %}
@@ -498,6 +532,23 @@ resource "openstack_compute_instance_v2" "{{ partition.name }}" {
498
532
- " ${openstack_compute_keypair_v2.cluster_keypair.public_key}"
499
533
{%- endif %}
500
534
EOF
535
+
536
+ metadata = {
537
+ {% for playbook in ansible_init_playbooks %}
538
+ ansible_init_pb_{{ loop.index0 }}_name = " {{ playbook.name }}"
539
+ {% if playbook.stage is defined %}
540
+ ansible_init_pb_{{ loop.index0 }}_stage = " {{ playbook.stage }}"
541
+ {% endif %}
542
+ {% endfor %}
543
+ {% for collection in ansible_init_collections %}
544
+ ansible_init_coll_{{ loop.index0 }}_name = " {{ collection.name }}"
545
+ ansible_init_coll_{{ loop.index0 }}_type = " {{ collection.type }}"
546
+ ansible_init_coll_{{ loop.index0 }}_version = " {{ collection.version }}"
547
+ {% if collection.source is defined %}
548
+ ansible_init_coll_{{ loop.index0 }}_source = " {{ collection.source }}"
549
+ {% endif %}
550
+ {% endfor %}
551
+ }
501
552
}
502
553
503
554
{% endfor %}
0 commit comments